From: Heiko Schlittermann (HS12-RIPE) Date: Fri, 29 Nov 2019 09:38:47 +0000 (+0800) Subject: Testsuite: strip trailing space at -bt output X-Git-Tag: exim-4.93-RC6~4 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cc49c6977b5736353b07e174b0fbb01086097f80;p=exim.git Testsuite: strip trailing space at -bt output Depending on the length of the ip address, Exim adds spaces to -bt output, to make all lines the same length (why? Maybe to add port= or mx= later in a nicely aligned manner) compare: host 127.0.0.1 [127.0.0.1] host 10.0.0.1 [10.0.0.1]- vs: host 127.0.0.1 [127.0.0.1]-- host 169.16.16.16 [169.16.16.10] --- diff --git a/test/runtest b/test/runtest index 358e2bab8..be35e157f 100755 --- a/test/runtest +++ b/test/runtest @@ -800,6 +800,12 @@ RESET_AFTER_EXTRA_LINE_READ: # Also, the length of space at the end of the host line is dependent # on the length of the longest line, so strip it also on otherwise # un-rewritten lines like localhost + # + # host 127.0.0.1 [127.0.0.1] + # host 10.0.0.1 [10.0.0.1]- + # + # host 127.0.0.1 [127.0.0.1]-- + # host 169.16.16.16 [169.16.16.10] s/^\s+host\s(\S+)\s+(\S+)/ host $1 $2/; s/^\s+(host\s\S+\s\S+)\s+(port=.*)/ host $1 $2/; @@ -811,7 +817,7 @@ RESET_AFTER_EXTRA_LINE_READ: s/(^|\W)\K\Q$parm_ipv6_stripped\E/ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6/g; s/\b\Q$parm_ipv4r\E\b/ip4-reverse/g; s/(^|\W)\K\Q$parm_ipv6r\E/ip6-reverse/g; - s/^(\s+host\s\S+\s+\[\S+\]) +$/$1 /; + s/^\s+host\s\S+\s+\[\S+\]\K +$//; # strip, not collapse the trailing whitespace # ======== Test network IP addresses ======== diff --git a/test/stdout/0190 b/test/stdout/0190 index a88a851b0..756f7f851 100644 --- a/test/stdout/0190 +++ b/test/stdout/0190 @@ -97,17 +97,17 @@ y@batch4 userx@bdomain1 router = r3, transport = smtp2 host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4] - host 127.0.0.1 [127.0.0.1] + host 127.0.0.1 [127.0.0.1] host the.local.host.name [ip4.ip4.ip4.ip4] userx@bdomain2 router = r3, transport = smtp2 host the.local.host.name [ip4.ip4.ip4.ip4] - host 127.0.0.1 [127.0.0.1] + host 127.0.0.1 [127.0.0.1] host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4] userx@bdomain3 router = r3, transport = smtp2 host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4] - host 127.0.0.1 [127.0.0.1] + host 127.0.0.1 [127.0.0.1] host the.local.host.name [ip4.ip4.ip4.ip4] ******** SERVER ******** diff --git a/test/stdout/0350 b/test/stdout/0350 index d951172b7..120a1d4a8 100644 --- a/test/stdout/0350 +++ b/test/stdout/0350 @@ -1,4 +1,4 @@ xx@yy router = r1, transport = t1 - host 1.2.3.4 [1.2.3.4] + host 1.2.3.4 [1.2.3.4] host other2.test.ex [V4NET.12.3.2] diff --git a/test/stdout/0430 b/test/stdout/0430 index 7914594b4..1229b0ef8 100644 --- a/test/stdout/0430 +++ b/test/stdout/0430 @@ -48,7 +48,7 @@ x@manual.route router = r1, transport = t1 host ten-1.test.ex [V4NET.0.0.1] MX=5 host eximtesthost.test.ex [ip4.ip4.ip4.ip4] MX=5 - host ten-6.test.ex [V4NET.0.0.6] + host ten-6.test.ex [V4NET.0.0.6] x@manual.route is undeliverable: lowest numbered MX record points to local host x@random.manual.route cannot be resolved at this time: lookup of host "localhost.test.ex" failed in r2 router x@random.manual.route diff --git a/test/stdout/1006 b/test/stdout/1006 index 2657c47a9..1457c08d2 100644 --- a/test/stdout/1006 +++ b/test/stdout/1006 @@ -5,7 +5,7 @@ dnslookup@mx46.test.ex manualroute@test.ex router = r2, transport = smtp host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031] - host 46.test.ex [V4NET.0.0.4] + host 46.test.ex [V4NET.0.0.4] dnslookup@v6.test.ex router = r1, transport = smtp host v6.test.ex [V6NET:ffff:836f:a00:a:800:200a:c032] diff --git a/test/stdout/1009 b/test/stdout/1009 index 673bf0a2f..7e86fa182 100644 --- a/test/stdout/1009 +++ b/test/stdout/1009 @@ -1,7 +1,7 @@ x@46.test.ex router = r1, transport = t1 host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031] - host 46.test.ex [V4NET.0.0.4] + host 46.test.ex [V4NET.0.0.4] x@mx46.test.ex router = r1, transport = t1 host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031] MX=46 @@ -46,7 +46,7 @@ x@mx46.test.ex host 46.test.ex [V4NET.0.0.4] MX=46 x@mx46.test.ex router = r0, transport = t1 - host 46.test.ex [V4NET.0.0.4] + host 46.test.ex [V4NET.0.0.4] host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031] x@mx46.test.ex router = r0, transport = t1 diff --git a/test/stdout/4950 b/test/stdout/4950 index 89a34ad49..12c77344b 100644 --- a/test/stdout/4950 +++ b/test/stdout/4950 @@ -14,4 +14,4 @@ userx@other1.test.ex userx@other99.test.ex cannot be resolved at this time: host non-exist.test.ex not found when translating other99.test.ex [V4NET.99.0.1] userx@other99.test.ex router = lookuphost, transport = smtp - host non-exist.test.ex [unknown] + host non-exist.test.ex [unknown]