Cover failure not found files cases.

This commit is contained in:
Andrés N. Robalino 2019-10-22 08:08:24 -05:00
parent 5b701cd197
commit a317072e4e
2 changed files with 14 additions and 0 deletions

View File

@ -73,3 +73,16 @@ fn knows_the_filesystems_entered() {
));
})
}
#[test]
fn errors_if_file_not_found() {
Playground::setup("enter_test_2", |dirs, _| {
let actual = nu_error!(
cwd: dirs.test(),
"enter i_dont_exist.csv"
);
assert!(actual.contains("File could not be opened"));
assert!(actual.contains("file not found"));
})
}

View File

@ -226,4 +226,5 @@ fn errors_if_file_not_found() {
);
assert!(actual.contains("File could not be opened"));
assert!(actual.contains("file not found"));
}