mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Ignore various files that are probably not tests when searching for tests
Closes #732
This commit is contained in:
parent
42e57f64b7
commit
758c11b22c
@ -162,7 +162,11 @@ fn make_tests(&config config) -> test::test_desc[] {
|
||||
}
|
||||
|
||||
fn is_test(&str testfile) -> bool {
|
||||
str::ends_with(testfile, ".rs") || str::ends_with(testfile, ".rc")
|
||||
auto name = fs::basename(testfile);
|
||||
(str::ends_with(name, ".rs") || str::ends_with(name, ".rc"))
|
||||
&& !(str::starts_with(name, ".")
|
||||
|| str::starts_with(name, "#")
|
||||
|| str::starts_with(name, "~"))
|
||||
}
|
||||
|
||||
fn make_test(&config config, &str testfile) -> test::test_desc {
|
||||
|
Loading…
Reference in New Issue
Block a user