about summary refs log tree commit diff
path: root/library/test/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/test/src/lib.rs')
-rw-r--r--library/test/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs
index 3ff79eaea49..c38a8c965be 100644
--- a/library/test/src/lib.rs
+++ b/library/test/src/lib.rs
@@ -396,8 +396,8 @@ pub fn filter_tests(opts: &TestOpts, tests: Vec<TestDescAndFn>) -> Vec<TestDescA
     };
 
     // Remove tests that don't match the test filter
-    if let Some(ref filter) = opts.filter {
-        filtered.retain(|test| matches_filter(test, filter));
+    if !opts.filters.is_empty() {
+        filtered.retain(|test| opts.filters.iter().any(|filter| matches_filter(test, filter)));
     }
 
     // Skip tests that match any of the skip filters