Add error checking on missing test case

This commit is contained in:
DJRHails 2020-05-19 13:27:52 +01:00 committed by David Peter
parent bbf3d0d430
commit dc120c547d
1 changed files with 18 additions and 0 deletions

View File

@ -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