summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2022-02-05 17:43:55 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2022-02-05 17:47:34 +0000
commitacfde2172e82f6b776f16d78f789c6968b69b9f0 (patch)
treeb508322f5606e43032240ff031fed74281237ad3 /test
parentb07d141af23f2ab160eba2b58a834baee513b3f8 (diff)
Testsuite: sort for "seen" hints DB dumps. Bug 2833
Diffstat (limited to 'test')
-rwxr-xr-xtest/runtest12
-rw-r--r--test/stdout/06264
2 files changed, 13 insertions, 3 deletions
diff --git a/test/runtest b/test/runtest
index ede05bea8..8e3a1f42c 100755
--- a/test/runtest
+++ b/test/runtest
@@ -2316,7 +2316,7 @@ if (/^dump\s+(\S+)/)
sort { $a->[0] cmp $b->[0] }
#map { [ (split)[0] =~ s/\Q$parm_ipv4/ip4.ip4.ip4.ip4/gr, $_ ] } # this is too modern for 5.10.1
map {
- (my $k = (split)[0]) =~ s/\Q$parm_ipv4/ip4.ip4.ip4.ip4/g;
+ (my $k = (split)[0]) =~ s/\Q$parm_ipv4\E/ip4.ip4.ip4.ip4/g;
[ $k, $_ ]
}
do { local $/ = "\n "; <$in> };
@@ -2337,6 +2337,16 @@ if (/^dump\s+(\S+)/)
return $aa cmp $bb;
} @temp;
}
+ elsif ($which eq "seen")
+ {
+ @temp = sort {
+ (my $aa = $a) =~ s/^([\d.]+)/$1/;
+ (my $bb = $b) =~ s/^([\d.]+)/$1/;
+ $aa =~ s/\Q$parm_ipv4\E/ip4.ip4.ip4.ip4/;
+ $bb =~ s/\Q$parm_ipv4\E/ip4.ip4.ip4.ip4/;
+ return $aa cmp $bb;
+ } @temp;
+ }
print $out @temp;
}
close($in); # close it explicitly, otherwise $? does not get set
diff --git a/test/stdout/0626 b/test/stdout/0626
index 44b481f31..0c8ad3452 100644
--- a/test/stdout/0626
+++ b/test/stdout/0626
@@ -41,8 +41,8 @@
550 Administrative prohibition
221 test.ex closing connection
+++++++++++++++++++++++++++
-ip4.ip4.ip4.ip4 07-Mar-2000 12:21:52
127.0.0.1 07-Mar-2000 12:21:52
+ip4.ip4.ip4.ip4 07-Mar-2000 12:21:52
**** SMTP testing session as if from host 127.0.0.1
**** but without any ident (RFC 1413) callback.
@@ -54,9 +54,9 @@ ip4.ip4.ip4.ip4 07-Mar-2000 12:21:52
550 Administrative prohibition
221 test.ex closing connection
+++++++++++++++++++++++++++
+127.0.0.1 07-Mar-2000 12:21:52
127.0.0.1_foo 07-Mar-2000 12:21:52
ip4.ip4.ip4.ip4 07-Mar-2000 12:21:52
-127.0.0.1 07-Mar-2000 12:21:52
**** SMTP testing session as if from host 127.0.0.1
**** but without any ident (RFC 1413) callback.