diff options
Diffstat (limited to 'tests/cli.rs')
-rw-r--r-- | tests/cli.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/cli.rs b/tests/cli.rs index 8197a92..672a798 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -45,3 +45,22 @@ fn quits_when_exit_command_is_sent() -> Result<()> { p.exp_eof()?; 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\"")?; + expect_prompt(&mut p)?; + Ok(()) +} + +#[test] +fn can_init_a_new_git_repo() -> Result<()> { + let mut p = spawn_interactive_process()?; + p.send_line("git-init my-new-repo")?; + p.exp_string("Successfully created my-new-repo.git")?; + expect_prompt(&mut p)?; + // TODO: assert that the repo is actually there? + Ok(()) +} |