mirror of
https://github.com/sharkdp/fd
synced 2024-11-02 14:57:59 +00:00
Add a test for a single missing search path
This commit is contained in:
parent
65b65b32be
commit
ca2ef7ba82
1 changed files with 26 additions and 0 deletions
|
@ -117,6 +117,32 @@ fn test_multi_file() {
|
||||||
te.assert_output(&["b.foo", "test1", "test2"], "test1/b.foo");
|
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
|
/// Explicit root path
|
||||||
#[test]
|
#[test]
|
||||||
fn test_explicit_root_path() {
|
fn test_explicit_root_path() {
|
||||||
|
|
Loading…
Reference in a new issue