From 3455f16079c2ca676e092d2123b8895e68e1a3ee Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 21 Jun 2022 15:25:07 -0400 Subject: chore(test_util): add new string assertion macros (#14928) --- cli/tests/integration/watcher_tests.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'cli/tests/integration/watcher_tests.rs') diff --git a/cli/tests/integration/watcher_tests.rs b/cli/tests/integration/watcher_tests.rs index 046dcec07..1e79a219d 100644 --- a/cli/tests/integration/watcher_tests.rs +++ b/cli/tests/integration/watcher_tests.rs @@ -4,19 +4,11 @@ use flaky_test::flaky_test; use std::fs::write; use std::io::BufRead; use test_util as util; +use test_util::assert_contains; use test_util::TempDir; const CLEAR_SCREEN: &str = r#"[2J"#; -macro_rules! assert_contains { - ($string:expr, $($test:expr),+) => { - let string = $string; // This might be a function call or something - if !($(string.contains($test))||+) { - panic!("{:?} does not contain any of {:?}", string, [$($test),+]); - } - } -} - // Helper function to skip watcher output that contains "Restarting" // phrase. fn skip_restarting_line( -- cgit v1.2.3