mirror of
https://github.com/sharkdp/fd
synced 2024-10-06 07:49:18 +00:00
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",
|
||||
);
|
||||
|
||||
te.assert_error(
|
||||
&["a.foo", "real", "fake"],
|
||||
"[fd error]: Search path 'fake' is not a directory.",
|
||||
);
|
||||
|
||||
te.assert_output(
|
||||
&["", "real", "fake"],
|
||||
"real/a.foo
|
||||
|
@ -139,6 +144,19 @@ fn test_multi_file_with_missing() {
|
|||
"real/a.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
|
||||
|
|
Loading…
Reference in a new issue