mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-21 20:35:10 +00:00
Add help tests to list.bats.
This commit is contained in:
parent
09c375633f
commit
07108dc706
@ -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>]" ]]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user