Add help tests to list.bats.

This commit is contained in:
William Melody 2016-01-26 19:00:02 -08:00
parent 09c375633f
commit 07108dc706
1 changed files with 15 additions and 0 deletions

View File

@ -42,3 +42,18 @@ Disabled:
_compare "'$_expected'" "'$output'"
[[ "$output" == "$_expected" ]]
}
# help ########################################################################
@test "\`help list\` exits with status 0." {
run "$_HOSTS" help list
[[ $status -eq 0 ]]
}
@test "\`help list\` prints help information." {
run "$_HOSTS" help list
printf "\$status: %s\n" "$status"
printf "\$output: '%s'\n" "$output"
[[ "${lines[0]}" == "Usage:" ]]
[[ "${lines[1]}" == " hosts list [enabled | disabled | <search string>]" ]]
}