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