diff --git a/bin/tests/system/nslookup/tests.sh b/bin/tests/system/nslookup/tests.sh index c68b5cfc09..32430320c9 100644 --- a/bin/tests/system/nslookup/tests.sh +++ b/bin/tests/system/nslookup/tests.sh @@ -101,7 +101,7 @@ lines=$(grep -c "Server:" nslookup.out${n}) test $lines -eq 1 || ret=1 lines=$(grep -c "canonical name" nslookup.out${n}) test $lines -eq 1 || ret=1 -lines=$(grep a-only.example.net nslookup.out${n} | grep -cv "canonical name") +lines=$(grep a-only.example.net nslookup.out${n} | grep -cEv "(canonical name|^;;)") test $lines -eq 1 || ret=1 grep "1.2.3.4" nslookup.out${n} >/dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi @@ -117,7 +117,7 @@ lines=$(grep -c "Server:" nslookup.out${n}) test $lines -eq 1 || ret=1 lines=$(grep -c "canonical name" nslookup.out${n}) test $lines -eq 1 || ret=1 -lines=$(grep aaaa-only.example.net nslookup.out${n} | grep -cv "canonical name") +lines=$(grep aaaa-only.example.net nslookup.out${n} | grep -cEv "(canonical name|^;;)") test $lines -eq 1 || ret=1 grep "2001::ffff" nslookup.out${n} >/dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi @@ -133,7 +133,7 @@ lines=$(grep -c "Server:" nslookup.out${n}) test $lines -eq 1 || ret=1 lines=$(grep -c "canonical name" nslookup.out${n}) test $lines -eq 1 || ret=1 -lines=$(grep dual.example.net nslookup.out${n} | grep -cv "canonical name") +lines=$(grep dual.example.net nslookup.out${n} | grep -cEv "(canonical name|^;;)") test $lines -eq 2 || ret=1 grep "1.2.3.4" nslookup.out${n} >/dev/null || ret=1 grep "2001::ffff" nslookup.out${n} >/dev/null || ret=1