mirror of
https://github.com/sharkdp/fd
synced 2024-09-05 16:23:47 +00:00
Add a test for a single missing search path
This commit is contained in:
parent
65b65b32be
commit
ca2ef7ba82
|
@ -117,6 +117,32 @@ fn test_multi_file() {
|
|||
te.assert_output(&["b.foo", "test1", "test2"], "test1/b.foo");
|
||||
}
|
||||
|
||||
/// Test search over multiple directory with missing
|
||||
#[test]
|
||||
fn test_multi_file_with_missing() {
|
||||
let dirs = &["real"];
|
||||
let files = &["real/a.foo", "real/b.foo"];
|
||||
let te = TestEnv::new(dirs, files);
|
||||
te.assert_output(
|
||||
&["a.foo", "real", "fake"],
|
||||
"real/a.foo",
|
||||
);
|
||||
|
||||
te.assert_output(
|
||||
&["", "real", "fake"],
|
||||
"real/a.foo
|
||||
real/b.foo",
|
||||
);
|
||||
|
||||
te.assert_output(&["a.foo", "real"], "real/a.foo");
|
||||
|
||||
te.assert_output(
|
||||
&["", "real", "fake1", "fake2"],
|
||||
"real/a.foo
|
||||
real/b.foo",
|
||||
);
|
||||
}
|
||||
|
||||
/// Explicit root path
|
||||
#[test]
|
||||
fn test_explicit_root_path() {
|
||||
|
|
Loading…
Reference in a new issue