From 1cc90f4ab48944d49241a7ee64526bff1ebbddc5 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Fri, 7 Jul 2000 21:43:49 +0000 Subject: [PATCH] Check that the rcodes in the 2 messages are the same --- bin/tests/system/digcomp.pl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/tests/system/digcomp.pl b/bin/tests/system/digcomp.pl index d480cffaa8..5da31d632a 100644 --- a/bin/tests/system/digcomp.pl +++ b/bin/tests/system/digcomp.pl @@ -15,7 +15,7 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -# $Id: digcomp.pl,v 1.4 2000/06/22 21:51:25 tale Exp $ +# $Id: digcomp.pl,v 1.5 2000/07/07 21:43:49 bwelling Exp $ # Compare two files, each with the output from dig, for differences. # Ignore "unimportant" differences, like ordering of NS lines, TTL's, @@ -27,6 +27,8 @@ $file2 = $ARGV[1]; $count = 0; $firstname = ""; $status = 0; +$rcode1 = "none"; +$rcode2 = "none"; open(FILE1, $file1) || die("$! $file1"); while () { @@ -51,6 +53,9 @@ while () { $entry{"$name ; $class.$type ; $value"} = $_; } } + elsif (/^;.+status:\s+(\S+).+$/) { + $rcode1 = $1; + } } close (FILE1); @@ -78,6 +83,9 @@ while () { $status = 1; } } + elsif (/^;.+status:\s+(\S+).+$/) { + $rcode2 = $1; + } } close (FILE2); @@ -92,4 +100,9 @@ foreach $key (keys(%entry)) { } } +if ($rcode1 != $rcode2) { + print ("< status: $rcode1\n"); + print ("> status: $rcode2\n"); +} + exit($status);