mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-28 15:56:33 +00:00
Test number of $lines
in hosts.bats test.
This commit is contained in:
parent
7c961e1318
commit
b4c7370c10
@ -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" ]]
|
||||
|
Loading…
Reference in New Issue
Block a user