From b4c7370c10f9cb08e194abead5199805f79849a9 Mon Sep 17 00:00:00 2001 From: William Melody Date: Tue, 26 Jan 2016 17:49:05 -0800 Subject: [PATCH] Test number of `$lines` in hosts.bats test. --- test/hosts.bats | 1 + 1 file changed, 1 insertion(+) diff --git a/test/hosts.bats b/test/hosts.bats index 0fec4f8..5fa791b 100644 --- a/test/hosts.bats +++ b/test/hosts.bats @@ -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" ]]