diff options
Diffstat (limited to 'tests/cli.rs')
-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(()) } |