File tree 1 file changed +10
-14
lines changed
1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -37,21 +37,17 @@ mod test {
37
37
use crate :: config:: { Config , FileName } ;
38
38
use crate :: ignore_path:: IgnorePathSet ;
39
39
40
+ use rustfmt_config_proc_macro:: nightly_only_test;
41
+
42
+ #[ nightly_only_test]
40
43
#[ test]
41
44
fn test_ignore_path_set ( ) {
42
- match option_env ! ( "CFG_RELEASE_CHANNEL" ) {
43
- // this test requires nightly
44
- None | Some ( "nightly" ) => {
45
- let config =
46
- Config :: from_toml ( r#"ignore = ["foo.rs", "bar_dir/*"]"# , Path :: new ( "" ) )
47
- . unwrap ( ) ;
48
- let ignore_path_set = IgnorePathSet :: from_ignore_list ( & config. ignore ( ) ) . unwrap ( ) ;
49
-
50
- assert ! ( ignore_path_set. is_match( & FileName :: Real ( PathBuf :: from( "src/foo.rs" ) ) ) ) ;
51
- assert ! ( ignore_path_set. is_match( & FileName :: Real ( PathBuf :: from( "bar_dir/baz.rs" ) ) ) ) ;
52
- assert ! ( !ignore_path_set. is_match( & FileName :: Real ( PathBuf :: from( "src/bar.rs" ) ) ) ) ;
53
- }
54
- _ => ( ) ,
55
- } ;
45
+ let config =
46
+ Config :: from_toml ( r#"ignore = ["foo.rs", "bar_dir/*"]"# , Path :: new ( "" ) ) . unwrap ( ) ;
47
+ let ignore_path_set = IgnorePathSet :: from_ignore_list ( & config. ignore ( ) ) . unwrap ( ) ;
48
+
49
+ assert ! ( ignore_path_set. is_match( & FileName :: Real ( PathBuf :: from( "src/foo.rs" ) ) ) ) ;
50
+ assert ! ( ignore_path_set. is_match( & FileName :: Real ( PathBuf :: from( "bar_dir/baz.rs" ) ) ) ) ;
51
+ assert ! ( !ignore_path_set. is_match( & FileName :: Real ( PathBuf :: from( "src/bar.rs" ) ) ) ) ;
56
52
}
57
53
}
You can’t perform that action at this time.
0 commit comments