File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use crate :: test_utils:: get_asset_base_path;
22use insta:: { assert_ron_snapshot, glob} ;
33use nu_protocol:: Span ;
4+ use std:: fs;
45use test_utils:: setup_plugin_for_test;
56
67mod test_utils;
78
89#[ test]
910fn private_assets ( ) -> Result < ( ) , nu_protocol:: ShellError > {
10- let mut plugin_test = setup_plugin_for_test ( vec ! [ Box :: new( nu_command:: Open ) ] ) ?;
1111 let asset_path = get_asset_base_path ( ) . join ( "private" ) ;
1212
13+ // skip if there's only ".empty" file since glob!() would fail otherwise
14+ if fs:: read_dir ( & asset_path)
15+ . expect ( "failed to read assets directory" )
16+ . count ( )
17+ <= 1
18+ {
19+ return Ok ( ( ) ) ;
20+ }
21+
22+ let mut plugin_test = setup_plugin_for_test ( vec ! [ Box :: new( nu_command:: Open ) ] ) ?;
23+
1324 let insta_filters = vec ! [
1425 // replace nu::Span with empty string:
1526 // - `(?ms)` turns on multiline+ dot matches newline
You can’t perform that action at this time.
0 commit comments