summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-06-18 12:30:54 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2018-06-21 18:23:15 +0100
commitb24eb9cd4cd3bacbb044090cba7140a012b3eabb (patch)
tree2aa14e8933b7bd00110f99277f9cef43cc6172bc /test
parent2fc30c289769075598c1c5c536dfd74f2bafbb11 (diff)
Testsuite: workaround older-perl bug
Diffstat (limited to 'test')
-rwxr-xr-xtest/runtest14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/runtest b/test/runtest
index a35796c2c..102ec9ffc 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1217,16 +1217,22 @@ RESET_AFTER_EXTRA_LINE_READ:
s/(DKIM: validation error: )error:[0-9A-F]{8}:rsa routines:(?:(?i)int_rsa_verify|CRYPTO_internal):(?:bad signature|algorithm mismatch)$/$1Public key signature verification has failed./;
# DKIM timestamps
- s/(DKIM: d=.*) t=([0-9]*) x=([0-9]*)(?{ return $3 - $2; }) /$1 t=T x=T+$^R /;
+ if ( /(DKIM: d=.*) t=([0-9]*) x=([0-9]*) / )
+ {
+ my ($prefix, $t_diff) = ($1, $3 - $2);
+ s/DKIM: d=.* t=[0-9]* x=[0-9]* /${prefix} t=T x=T+${t_diff} /;
+ }
}
# ======== mail ========
elsif ($is_mail)
{
- # DKIM timestamps
- if ( /^\s+t=[0-9]*; x=[0-9]*; b=[A-Za-z0-9+\/]+$/ ) {
- s/^(\s+)t=([0-9]*); x=([0-9]*);(?{ return $3 - $2; }) b=[A-Za-z0-9+\/]+$/$1t=T; x=T+$^R; b=bbbb;/;
+ # DKIM timestamps, and signatures depending thereon
+ if ( /^(\s+)t=([0-9]*); x=([0-9]*); b=[A-Za-z0-9+\/]+$/ )
+ {
+ my ($indent, $t_diff) = ($1, $3 - $2);
+ s/.*/${indent}t=T; x=T+${t_diff}; b=bbbb;/;
<IN>;
<IN>;
}