Add help tests to enabled.bats.

This commit is contained in:
William Melody 2016-01-26 19:05:10 -08:00
parent 481e593666
commit f30981ec80
1 changed files with 15 additions and 0 deletions

View File

@ -35,3 +35,18 @@ load test_helper
[[ "${lines[3]}" == "fe80::1%lo0 localhost" ]]
[[ "${lines[4]}" == "127.0.0.2 example.com" ]]
}
# help ########################################################################
@test "\`help enabled\` exits with status 0." {
run "$_HOSTS" help enabled
[[ $status -eq 0 ]]
}
@test "\`help enabled\` prints help information." {
run "$_HOSTS" help enabled
printf "\$status: %s\n" "$status"
printf "\$output: '%s'\n" "$output"
[[ "${lines[0]}" == "Usage:" ]]
[[ "${lines[1]}" == " hosts enabled" ]]
}