X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/9e146c9f623bfaaf104450e7be8ab78e042c7c9d..2525748962c69c005b3c73779b26c8883b219956:/test/runtest?ds=sidebyside diff --git a/test/runtest b/test/runtest index d6b3fac7f..397ea474d 100755 --- a/test/runtest +++ b/test/runtest @@ -1,6 +1,6 @@ #! /usr/bin/perl -w -# $Cambridge: exim/test/runtest,v 1.8 2006/04/20 15:34:25 ph10 Exp $ +# $Cambridge: exim/test/runtest,v 1.10 2006/04/28 13:46:36 ph10 Exp $ ############################################################################### # This is the controlling script for the "new" test suite for Exim. It should # @@ -526,6 +526,8 @@ while() s/host\s\Q$parm_ipv6\E\s\[\Q$parm_ipv6\E\]/host ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6 [ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6]/; s/\b\Q$parm_ipv4\E\b/ip4.ip4.ip4.ip4/g; s/\b\Q$parm_ipv6\E\b/ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6/g; + s/\b\Q$parm_ipv4r\E\b/ip4-reverse/g; + s/\b\Q$parm_ipv6r\E\b/ip6-reverse/g; # ======== Test network IP addresses ======== @@ -613,7 +615,7 @@ while() s/\b\d+\.H\d+P\d+\b/dddddddddd.HddddddPddddd/; # Maildirsize data - if (/^\d+S,\d+C\s*$/) + while (/^\d+S,\d+C\s*$/) { print MUNGED; while () @@ -623,6 +625,7 @@ while() } last if !defined $_; } + last if !defined $_; # ======== Output from the "fd" program about open descriptors ======== @@ -2403,6 +2406,24 @@ else print "IPv4 address is $parm_ipv4\n"; print "IPv6 address is $parm_ipv6\n"; +# For munging test output, we need the reversed IP addresses. + +$parm_ipv4r = ($parm_ipv4 !~ /^\d/)? "" : + join(".", reverse(split /\./, $parm_ipv4)); + +$parm_ipv6r = ""; +if ($parm_ipv6 =~ /^[\da-f]/) + { + my(@comps) = split /:/, $parm_ipv6; + my(@nibbles); + foreach $comp (@comps) + { + push @nibbles, sprintf("%lx", hex($comp) >> 8); + push @nibbles, sprintf("%lx", hex($comp) & 0xff); + } + $parm_ipv6r = join(".", reverse(@nibbles)); + } + # Find the host name, fully qualified. chomp($temp = `hostname`);