Gitweb:
https://git.exim.org/exim.git/commitdiff/cc49c6977b5736353b07e174b0fbb01086097f80
Commit: cc49c6977b5736353b07e174b0fbb01086097f80
Parent: a31c0dcde94eefd57201bdfbc34d3c07bb953630
Author: Heiko Schlittermann (HS12-RIPE) <hs@???>
AuthorDate: Fri Nov 29 17:38:47 2019 +0800
Committer: Heiko Schlittermann (HS12-RIPE) <hs@???>
CommitDate: Fri Nov 29 16:46:29 2019 +0100
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]
---
test/runtest | 8 +++++++-
test/stdout/0190 | 6 +++---
test/stdout/0350 | 2 +-
test/stdout/0430 | 2 +-
test/stdout/1006 | 2 +-
test/stdout/1009 | 4 ++--
test/stdout/4950 | 2 +-
7 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/test/runtest b/test/runtest
index 358e2ba..be35e15 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 a88a851..756f7f8 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 d951172..120a1d4 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 7914594..1229b0e 100644
--- a/test/stdout/0430
+++ b/test/stdout/0430
@@ -48,7 +48,7 @@ x@???
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@??? is undeliverable: lowest numbered MX record points to local host
x@??? cannot be resolved at this time: lookup of host "localhost.test.ex" failed in r2 router
x@???
diff --git a/test/stdout/1006 b/test/stdout/1006
index 2657c47..1457c08 100644
--- a/test/stdout/1006
+++ b/test/stdout/1006
@@ -5,7 +5,7 @@ dnslookup@???
manualroute@???
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@???
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 673bf0a..7e86fa1 100644
--- a/test/stdout/1009
+++ b/test/stdout/1009
@@ -1,7 +1,7 @@
x@???
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@???
router = r1, transport = t1
host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031] MX=46
@@ -46,7 +46,7 @@ x@???
host 46.test.ex [V4NET.0.0.4] MX=46
x@???
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@???
router = r0, transport = t1
diff --git a/test/stdout/4950 b/test/stdout/4950
index 89a34ad..12c7734 100644
--- a/test/stdout/4950
+++ b/test/stdout/4950
@@ -14,4 +14,4 @@ userx@???
userx@??? cannot be resolved at this time: host non-exist.test.ex not found when translating other99.test.ex [V4NET.99.0.1]
userx@???
router = lookuphost, transport = smtp
- host non-exist.test.ex [unknown]
+ host non-exist.test.ex [unknown]