diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2023-02-28 21:12:06 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2023-02-28 21:12:06 +0200 |
commit | 54e3aa3422ae75fc9d69ceb9d09a8cd1a3e168ec (patch) | |
tree | 46a84bd66ae02b7062f92f10a4851987ffb8a711 /tests | |
parent | 9f0f47abaa934b66da5b302236bfc89f95a7f329 (diff) |
Specifically test that commands that other shells might support aren't leaked through
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cli.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/cli.rs b/tests/cli.rs index 672a798..fcf38e8 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -47,10 +47,19 @@ fn quits_when_exit_command_is_sent() -> Result<()> { } #[test] +fn reports_error_with_unsupported_shell_commands() -> Result<()> { + let mut p = spawn_interactive_process()?; + p.send_line("ls")?; + p.exp_string("Unknown input \"ls\"")?; + expect_prompt(&mut p)?; + Ok(()) +} + +#[test] fn reports_error_with_nonsense_input() -> Result<()> { let mut p = spawn_interactive_process()?; - p.send_line("asdfg")?; - p.exp_string("Unknown input \"asdfg\"")?; + p.send_line(" asd fg ")?; + p.exp_string("Unknown input \"asd fg\"")?; expect_prompt(&mut p)?; Ok(()) } |