From bb0ee9609077ca9e0c014af03fab91f57e4b9712 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 Oct 2023 23:38:05 +0000 Subject: [PATCH] test_common: only hide TCP port in messages v2:// lei outputs are on the filesystem, so putting $HOST:$PORT is nonsensical. We'll also keep `127.0.0.1' or `[::1]' since it's harmless and can point out obvious errors in system configuration when testing with old Perls or libraries. --- lib/PublicInbox/TestCommon.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 3839ab459..96663731d 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -619,7 +619,7 @@ sub lei_ok (@) { my @msg = ref($_[0]) eq 'ARRAY' ? @{$_[0]} : @_; if (!$lei_loud) { for (@msg) { - s!\A([a-z0-9]+://)[^/]+/!$1\$HOST_PORT/!; + s!(127\.0\.0\.1|\[::1\]):(?:\d+)!$1:\$PORT!g; s!$tmpdir\b/(?:[^/]+/)?!\$TMPDIR/!g; s!\Q$PWD\E\b!\$PWD!g; } -- 2.47.2