1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-06-01 14:00:52 +00:00

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

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" ]]