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