Skip to content
Myr

test: Should not match substring filenames

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by DeflateAwning · committed by DeflateAwning · parent 468c807 · Browse files · 1 file+10 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−2 removed

  • tests:+10 added−2 removed

1 file+10 added−2 removed

modified:tests/tests.rs+10 added-2 removed
2153 unmodified lines
2154/// Literal search, non-substring (--exact)2155#[test]2156fn test_exact_literal_nonsubstring() {2157 let dirs = &["test1", "test2"];2158 let files = &["test1/a.foo", "test1/a_foo", "test2/Download (1).tar.gz"];2158 let files = &[2159 "test1/a.foo",2160 "test1/aa.foo",2161 "test1/a.food",2162 "test1/ca.food",2163 "test1/a_foo",2164 "test2/Download (1).tar.gz",2165 ];2166 let te = TestEnv::new(dirs, files);21672161 // Literal search, dot is treated as character2168 // Literal search, dot is treated as character. Should match only the exact name,2169 // not "aa.foo", "a.food", or "ca.food".2170 te.assert_output(&["--exact", "a.foo"], "test1/a.foo");21712172 // Literal search, parens are treated as characters. Substring should not match.2173 te.assert_output(&["--exact", "download (1)"], "");
630 unmodified lines