Skip to content

Commit 8647e29

Browse files
committed
Use substring matching for TESTNAME
1 parent 2e32905 commit 8647e29

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/compile-test.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,7 @@ fn base_config(test_dir: &str) -> compiletest::Config {
6464
fn test_filter() -> Box<dyn Sync + Fn(&Path) -> bool> {
6565
if let Ok(filters) = env::var("TESTNAME") {
6666
let filters: Vec<_> = filters.split(',').map(ToString::to_string).collect();
67-
Box::new(move |path| {
68-
filters.is_empty()
69-
|| filters
70-
.iter()
71-
.any(|f| path.file_stem().map_or(false, |stem| stem == f.as_str()))
72-
})
67+
Box::new(move |path| filters.iter().any(|f| path.to_string_lossy().contains(f)))
7368
} else {
7469
Box::new(|_| true)
7570
}

0 commit comments

Comments
 (0)