mirror of
https://github.com/octoleo/hosts.git
synced 2025-01-01 05:31:49 +00:00
Add help tests to disabled.bats.
This commit is contained in:
parent
631c295ad1
commit
c5fe3aedb2
@ -33,3 +33,18 @@ load test_helper
|
|||||||
[[ "${lines[1]}" == "127.0.0.1 example.com" ]]
|
[[ "${lines[1]}" == "127.0.0.1 example.com" ]]
|
||||||
[[ "${lines[2]}" == "" ]]
|
[[ "${lines[2]}" == "" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# help ########################################################################
|
||||||
|
|
||||||
|
@test "\`help disabled\` exits with status 0." {
|
||||||
|
run "$_HOSTS" help disabled
|
||||||
|
[[ $status -eq 0 ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "\`help disabled\` prints help information." {
|
||||||
|
run "$_HOSTS" help disabled
|
||||||
|
printf "\$status: %s\n" "$status"
|
||||||
|
printf "\$output: '%s'\n" "$output"
|
||||||
|
[[ "${lines[0]}" == "Usage:" ]]
|
||||||
|
[[ "${lines[1]}" == " hosts disabled" ]]
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user