From d2061da3894cdf558f5bc24e89e3afa916164b15 Mon Sep 17 00:00:00 2001 From: Mohammad Abunemeh Date: Thu, 22 Oct 2026 17:19:30 +0400 Subject: [PATCH] Use distinct filenames for smart-case regression Give the fixtures different numeric suffixes so they remain separate files on case-insensitive filesystems while testing the same pattern matching behavior. Assisted-by: OpenAI Codex (test correction and validation) Signed-off-by: Mohammad Abunemeh --- tests/tests.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/tests.rs b/tests/tests.rs index 54c2217..686924e 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -538,16 +538,19 @@ fn test_smart_case() { #[test] fn test_smart_case_inline_flags_and_patterns() { - let te = TestEnv::new(&[], &["foo-bar", "foo-BAR", "FOO-BAR"]); - let all = "FOO-BAR\nfoo-BAR\nfoo-bar"; + let te = TestEnv::new(&[], &["foo-bar-1", "foo-BAR-2", "FOO-BAR-3"]); + let all = "FOO-BAR-3\nfoo-BAR-2\nfoo-bar-1"; te.assert_output(&["foo", "--and", "bar"], all); te.assert_output(&["(?i)foo", "--and", "bar"], all); te.assert_output(&["foo", "--and", "(?i)bar"], all); te.assert_output(&["(?i:foo)", "--and", "bar"], all); te.assert_output(&["--ignore-case", "(?i)foo", "--and", "bar"], all); - te.assert_output(&["--case-sensitive", "(?i)foo", "--and", "bar"], "foo-bar"); - te.assert_output(&["(?i)Foo", "--and", "bar"], "foo-bar"); + te.assert_output( + &["--case-sensitive", "(?i)foo", "--and", "bar"], + "foo-bar-1", + ); + te.assert_output(&["(?i)Foo", "--and", "bar"], "foo-bar-1"); } /// Case sensitivity (--case-sensitive)