diff --git a/tests/command_enter_test.rs b/tests/command_enter_test.rs index fe22b56dbe..fc4a437a23 100644 --- a/tests/command_enter_test.rs +++ b/tests/command_enter_test.rs @@ -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")); + }) +} diff --git a/tests/command_open_tests.rs b/tests/command_open_tests.rs index 53e393eef4..48f438f3d6 100644 --- a/tests/command_open_tests.rs +++ b/tests/command_open_tests.rs @@ -226,4 +226,5 @@ fn errors_if_file_not_found() { ); assert!(actual.contains("File could not be opened")); + assert!(actual.contains("file not found")); }