diff options
-rw-r--r-- | readme.org | 2 | ||||
-rw-r--r-- | tests/cli.rs | 13 |
2 files changed, 12 insertions, 3 deletions
@@ -16,7 +16,7 @@ Pijul. - [X] interactive command prompt - [X] exit command - [ ] git init of private repo -- [ ] responds to unknown commands +- [X] responds to unknown commands - [ ] git fetch - git receive-pack <argument> - [ ] git push 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(()) } |