From 95ba8c45b2898876fdd0b3b279d2729ba0a6cc2f Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Sun, 1 May 2022 13:48:51 +0200 Subject: [PATCH] dir, vdir: fix incorrect regex in tests --- tests/by-util/test_dir.rs | 4 ++-- tests/by-util/test_vdir.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/by-util/test_dir.rs b/tests/by-util/test_dir.rs index 3ec416bb2..8c586a628 100644 --- a/tests/by-util/test_dir.rs +++ b/tests/by-util/test_dir.rs @@ -31,7 +31,7 @@ fn test_default_output() { scene .ucmd() .succeeds() - .stdout_does_not_match(&Regex::new("[rwx][^some-file1]").unwrap()); + .stdout_does_not_match(&Regex::new("[rwx-]{10}.*some-file1$").unwrap()); } #[test] @@ -51,5 +51,5 @@ fn test_long_output() { .ucmd() .arg("-l") .succeeds() - .stdout_matches(&Regex::new("[rwx][^some-file1]").unwrap()); + .stdout_matches(&Regex::new("[rwx-]{10}.*some-file1$").unwrap()); } diff --git a/tests/by-util/test_vdir.rs b/tests/by-util/test_vdir.rs index 01c540095..41bce1c40 100644 --- a/tests/by-util/test_vdir.rs +++ b/tests/by-util/test_vdir.rs @@ -31,7 +31,7 @@ fn test_default_output() { scene .ucmd() .succeeds() - .stdout_matches(&Regex::new("[rwx][^some-file1]").unwrap()); + .stdout_matches(&Regex::new("[rwx-]{10}.*some-file1$").unwrap()); } #[test] @@ -51,5 +51,5 @@ fn test_column_output() { .ucmd() .arg("-C") .succeeds() - .stdout_does_not_match(&Regex::new("[rwx][^some-file1]").unwrap()); + .stdout_does_not_match(&Regex::new("[rwx-]{10}.*some-file1$").unwrap()); }