Test number of `$lines` in hosts.bats test.

This commit is contained in:
William Melody 2016-01-26 17:49:05 -08:00
parent 7c961e1318
commit b4c7370c10
1 changed files with 1 additions and 0 deletions

View File

@ -9,6 +9,7 @@ load test_helper
@test "\`hosts\` with no arguments prints enabled rules." {
run "$_HOSTS"
[[ "${#lines[@]}" -eq 4 ]]
[[ "${lines[0]}" == "127.0.0.1 localhost" ]]
[[ "${lines[1]}" == "255.255.255.255 broadcasthost" ]]
[[ "${lines[2]}" == "::1 localhost" ]]