[exim-cvs] Testsuite: make it compatible with ancient Perl v…

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Testsuite: make it compatible with ancient Perl versions.
Gitweb: https://git.exim.org/exim.git/commitdiff/84b1b2779773e86c221ac0641b9d7c107c5594a5
Commit:     84b1b2779773e86c221ac0641b9d7c107c5594a5
Parent:     3b90b1d1cde55d00590193db15fd6c7dd87f34c8
Author:     Heiko Schlittermann (HS12-RIPE) <hs@???>
AuthorDate: Sun Nov 17 11:14:22 2019 +0800
Committer:  Heiko Schlittermann (HS12-RIPE) <hs@???>
CommitDate: Sun Nov 17 11:14:22 2019 +0800


    Testsuite: make it compatible with ancient Perl versions.


    Perl 5.10 doesn't seem to know the /r modifier for regular expressions.
---
 test/runtest | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


diff --git a/test/runtest b/test/runtest
index e8a3e8e..8ef5d64 100755
--- a/test/runtest
+++ b/test/runtest
@@ -2173,9 +2173,14 @@ if (/^dump\s+(\S+)/)
     # version, which matches the munging that is done later
     # Why? We must ensure sure, that 127.0.0.1 always sorts first
     # map-sort-map: Schwartz's transformation
+    # test 0099
     my @temp = map  { $_->[1] }
                sort { $a->[0] cmp $b->[0] }
-               map  { [ (split)[0] =~ s/\Q$parm_ipv4/ip4.ip4.ip4.ip4/gr, $_ ] }
+               #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;
+                [ $k, $_ ]
+               }
                do { local $/ = "\n  "; <$in> };
     foreach $item (@temp)
       {