From dc120c547d885633732dbf998f9e386c94ed65a0 Mon Sep 17 00:00:00 2001 From: DJRHails Date: Tue, 19 May 2020 13:27:52 +0100 Subject: [PATCH] Add error checking on missing test case --- tests/tests.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/tests.rs b/tests/tests.rs index 7924017..6ce2a9a 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -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