Merge pull request #863 from andrasio/cov-enter

Cover failure not found files cases.
This commit is contained in:
Andrés N. Robalino 2019-10-22 08:24:48 -05:00 committed by GitHub
commit 82b24d9beb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 could not be opened"));
assert!(actual.contains("file not found"));
} }