mirror of https://github.com/sharkdp/fd.git
Add error checking on missing test case
This commit is contained in:
parent
bbf3d0d430
commit
dc120c547d
|
@ -128,6 +128,11 @@ fn test_multi_file_with_missing() {
|
||||||
"real/a.foo",
|
"real/a.foo",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
te.assert_error(
|
||||||
|
&["a.foo", "real", "fake"],
|
||||||
|
"[fd error]: Search path 'fake' is not a directory.",
|
||||||
|
);
|
||||||
|
|
||||||
te.assert_output(
|
te.assert_output(
|
||||||
&["", "real", "fake"],
|
&["", "real", "fake"],
|
||||||
"real/a.foo
|
"real/a.foo
|
||||||
|
@ -139,6 +144,19 @@ fn test_multi_file_with_missing() {
|
||||||
"real/a.foo
|
"real/a.foo
|
||||||
real/b.foo",
|
real/b.foo",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
te.assert_error(
|
||||||
|
&["", "real", "fake1", "fake2"],
|
||||||
|
"[fd error]: Search path 'fake1' is not a directory.
|
||||||
|
[fd error]: Search path 'fake2' is not a directory.",
|
||||||
|
);
|
||||||
|
|
||||||
|
te.assert_failure_with_error(
|
||||||
|
&["", "fake1", "fake2"],
|
||||||
|
"[fd error]: Search path 'fake1' is not a directory.
|
||||||
|
[fd error]: Search path 'fake2' is not a directory.
|
||||||
|
[fd error]: No valid search paths given.",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Explicit root path
|
/// Explicit root path
|
||||||
|
|
Loading…
Reference in New Issue