Retries: rework DB keys, and fix exinext IPv6. Bug 3086
[exim.git] / test / runtest
index 07c499fa4f80bc729f0939464039e710d38f4d2c..e8f1933f2c5f568940dbf0a8ca356d2844ef7c01 100755 (executable)
@@ -500,7 +500,10 @@ RESET_AFTER_EXTRA_LINE_READ:
   s/T:(\S+)\s-22\s(\S+)\s/T:$1 -22 xxxx /;
 
   # port numbers in dumpdb output
-  s/T:([a-z.]+(:[0-9.]+)?):$parm_port_n /T:$1:PORT_N /;
+  s/T:([a-z0-9.]+(:[0-9.]+|:\[[^]]+])?):$parm_port_n /T:$1:PORT_N /;
+  s/T:([a-z0-9.[\]]+(:[0-9.]+|:\[[^]]+])?):$parm_port_s /T:$1:PORT_S /;
+  # and exinext
+  s/Transport: (?:[a-z0-9.]+|\[[^\]]+]) (?:[0-9.]+|\[[^\]]+]):\K$parm_port_s /PORT_S /;
 
   # port numbers in stderr
   s/^set_process_info: .*\]:\K$parm_port_d /PORT_D /;
@@ -515,8 +518,18 @@ RESET_AFTER_EXTRA_LINE_READ:
   # time used was fixed when I first started running automatic Exim tests.
 
   # Date/time in header lines and SMTP responses
-  s/[A-Z][a-z]{2},\s\d\d?\s[A-Z][a-z]{2}\s\d{4}\s\d\d\:\d\d:\d\d\s[-+]\d{4}
-    /Tue, 2 Mar 1999 09:44:33 +0000/gx;
+  s/[A-Z][a-z]{2},
+      (\s|\xE2\x96\x91)
+      \d\d?
+      (\s|\xE2\x96\x91)
+      [A-Z][a-z]{2}
+      (\s|\xE2\x96\x91)
+      \d{4}
+      (\s|\xE2\x96\x91)
+      \d\d\:\d\d:\d\d
+      (\s|\xE2\x96\x91)
+      [-+]\d{4}
+    /Tue,${1}2${2}Mar${3}1999${4}09:44:33${5}+0000/gx;
   # and in a French locale
   s/\S{4},\s\d\d?\s[^,]+\s\d{4}\s\d\d\:\d\d:\d\d\s[-+]\d{4}
     /dim., 10 f\xE9vr 2019 20:05:49 +0000/gx;
@@ -535,8 +548,14 @@ RESET_AFTER_EXTRA_LINE_READ:
   s/((D|[RQD]T)=)\d\.\d{3}s/$1q.qqqs/g;
 
   # Date/time in message separators
-  s/(?:[A-Z][a-z]{2}\s){2}\d\d\s\d\d:\d\d:\d\d\s\d\d\d\d
-    /Tue Mar 02 09:44:33 1999/gx;
+  s/(?:[A-Z][a-z]{2}
+      (\s|\xE2\x96\x91)
+    ){2}\d\d
+      (\s|\xE2\x96\x91)
+      \d\d:\d\d:\d\d
+      (\s|\xE2\x96\x91)
+      \d\d\d\d
+    /Tue${1}Mar${1}02${2}09:44:33${3}1999/gx;
 
   # Date of message arrival in spool file as shown by -Mvh
   s/^\d{9,10}\s0$/ddddddddd 0/;
@@ -805,7 +824,8 @@ RESET_AFTER_EXTRA_LINE_READ:
 
   # This handles "connection from" and the like, when the port is given
   if (!/listening for SMTP on/ && !/Connecting to/ && !/=>/ && !/->/
-      && !/\*>/&& !/==/  && !/\*\*/ && !/Connection refused/ && !/in response to/)
+      && !/\*>/&& !/==/  && !/\*\*/ && !/Connection refused/ && !/in response to/
+      && !/T(?:ransport)?:/)
     {
     s/\[([a-z\d:]+|\d+(?:\.\d+){3})\]:(\d+)/"[".$1."]:".new_value($2,"%s",\$next_port)/ie;
     }
@@ -1206,7 +1226,7 @@ RESET_AFTER_EXTRA_LINE_READ:
     next if /^TLS: not preloading (CA bundle|cipher list) for server$/;
     next if /^TLS: not preloading server certs$/;
 
-    # some plaatforms are missing the standard CA bundle file
+    # some platforms are missing the standard CA bundle file
     next if /^tls_set_watch\(\) fail on '\/usr\/lib\/ssl\/cert.pem': No such file or directory$/;
 
     # drop lookups
@@ -1378,7 +1398,7 @@ RESET_AFTER_EXTRA_LINE_READ:
       }
 
     # Different builds will have different lookup types included
-    s/^\s*search_type \K\d+ \((\w+)\) quoting -1 \(none\)$/NN ($1) quoting -1 (none)/;
+    s/search_type \K\d+ \((\w+)\) quoting -1 \(none\)$/NN ($1) quoting -1 (none)/;
     # and different numbers of lookup types result in different type-code letters,
     # so convert them all to "0"
     s%(?<!lsearch)[^ ](?=TESTSUITE/aux-fixed/(?:0414.list[12]|0464.domains)$)%0%;