nushell/tests/command_cd_tests.rs
Yehuda Katz 0dc4b2b686 Add support for external escape valve (^dir)
This commit makes it possible to force nu to treat a command as an external command by prefixing it with `^`. For example `^dir` will force `dir` to run an external command, even if `dir` is also a registered nu command.

This ensures that users don't need to leave nu just because we happened to use a command they need.

This commit adds a new token type for external commands, which, among other things, makes it pretty straight forward to syntax highlight external commands uniquely, and generally to treat them as special.
2019-08-15 15:18:18 -07:00

12 lines
276 B
Rust

mod helpers;
use helpers::in_directory as cwd;
#[test]
fn cd_directory_not_found() {
nu_error!(output, cwd("tests/fixtures"), "cd dir_that_does_not_exist");
assert!(output.contains("dir_that_does_not_exist"));
assert!(output.contains("directory not found"));
}