diff --git a/test/tests.bats b/test/tests.bats index a4d1023..50eac07 100644 --- a/test/tests.bats +++ b/test/tests.bats @@ -22,7 +22,7 @@ function it_shows_help_successfully { #@test function help_shows_usage { #@test run_chronic - assert_line --index 0 "Usage: chronic [args]..." + assert_line --index 0 "Usage: chronic [-t TIMEOUT] [args]..." } function help_shows_the_version { #@test @@ -89,4 +89,9 @@ function it_displays_standard_error_on_failure { #@test assert_line "stderr: A stately pleasure-dome decree" } +function it_displays_timeout_failure { #@test + run_chronic -t 1 bash -c 'sleep 5' + assert_line "**** Timeout, process killed! ****" +} + # EOF