File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -383,19 +383,21 @@ fn idempotence_tests() {
383
383
fn self_tests ( ) {
384
384
init_log ( ) ;
385
385
let mut files = get_test_files ( Path :: new ( "tests" ) , false ) ;
386
- let bin_directories = vec ! [
387
- "cargo-fmt" ,
388
- "git-rustfmt" ,
389
- "bin" ,
390
- "format-diff" ,
391
- "check_diff" ,
392
- ] ;
386
+ let bin_directories = vec ! [ "cargo-fmt" , "git-rustfmt" , "bin" , "format-diff" ] ;
393
387
for dir in bin_directories {
394
388
let mut path = PathBuf :: from ( "src" ) ;
395
389
path. push ( dir) ;
396
390
path. push ( "main.rs" ) ;
397
391
files. push ( path) ;
398
392
}
393
+ // for crates that need to be included but lies outside src
394
+ let external_crates = vec ! [ "check_diff" ] ;
395
+ for external_crate in external_crates {
396
+ let mut path = PathBuf :: from ( external_crate) ;
397
+ path. push ( "src" ) ;
398
+ path. push ( "main.rs" ) ;
399
+ files. push ( path) ;
400
+ }
399
401
files. push ( PathBuf :: from ( "src/lib.rs" ) ) ;
400
402
401
403
let ( reports, count, fails) = check_files ( files, & Some ( PathBuf :: from ( "rustfmt.toml" ) ) ) ;
You can’t perform that action at this time.
0 commit comments