From e3eb1e44828058e0e3e7ede589e113c4108a7a16 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sun, 15 Oct 2023 15:07:29 -0400 Subject: [PATCH] Revert "we don't need to do "cat X | foo" when we can do "foo X"" This reverts commit 7771539fb4397a7831b07fe0330536e6a55a7356. revert until we have time to track it down a bit more --- src/tests/modules/linelog/linelog.unlang | 2 +- .../modules/smtp/smtp_attachment/tls_attachment.unlang | 6 +++--- src/tests/modules/smtp/smtp_crln/tls_crln.unlang | 3 ++- .../modules/smtp/smtp_stringparse/tls_stringparse.unlang | 3 ++- src/tests/modules/smtp/tls_delivery.unlang | 6 +++--- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/tests/modules/linelog/linelog.unlang b/src/tests/modules/linelog/linelog.unlang index f0f9dafaf02ef..417d8d3f9a603 100644 --- a/src/tests/modules/linelog/linelog.unlang +++ b/src/tests/modules/linelog/linelog.unlang @@ -324,7 +324,7 @@ else { test_fail } -&Tmp-Integer-0 := `/bin/sh -c "wc -l $ENV{MODULE_TEST_DIR}/test_e.log"` +&Tmp-Integer-0 := `/bin/sh -c "cat $ENV{MODULE_TEST_DIR}/test_e.log | wc -l"` if (&Tmp-Integer-0 == 3) { test_pass diff --git a/src/tests/modules/smtp/smtp_attachment/tls_attachment.unlang b/src/tests/modules/smtp/smtp_attachment/tls_attachment.unlang index e4c540511b09e..5be8abf8e6e3d 100644 --- a/src/tests/modules/smtp/smtp_attachment/tls_attachment.unlang +++ b/src/tests/modules/smtp/smtp_attachment/tls_attachment.unlang @@ -44,9 +44,9 @@ echo $?"` == "1") { # Pull out the base64 encoded test, decode it, trim line endings # Compare the result with the expected output # -if !(`/bin/sh -c "grep -E '^[A-Za-z0-9+/]{4}*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$' build/ci/exim4/mail/smtp_attachment_receiver | \ - base64 -d | tr -d '\r\n' | \ - grep -f build/ci/exim4/testfile"`) { +if !(`/bin/sh -c "cat build/ci/exim4/mail/smtp_attachment_receiver | \ +grep -E '^[A-Za-z0-9+/]{4}*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$' | base64 -d | tr -d '\r\n' | \ +grep -f build/ci/exim4/testfile"`){ test_fail } diff --git a/src/tests/modules/smtp/smtp_crln/tls_crln.unlang b/src/tests/modules/smtp/smtp_crln/tls_crln.unlang index 9ecdc57a4f266..87075245bb7f1 100644 --- a/src/tests/modules/smtp/smtp_crln/tls_crln.unlang +++ b/src/tests/modules/smtp/smtp_crln/tls_crln.unlang @@ -37,7 +37,8 @@ echo $?"` == "1") { test_fail } -if !(`/bin/sh -c "grep -E 'Most Body' build/ci/exim4/mail/crln_test_receiver"`) { +if !(`/bin/sh -c "cat build/ci/exim4/mail/crln_test_receiver | \ +grep -E 'Most Body'"`) { test_fail } diff --git a/src/tests/modules/smtp/smtp_stringparse/tls_stringparse.unlang b/src/tests/modules/smtp/smtp_stringparse/tls_stringparse.unlang index 727d3a3033369..f71dc6a9b5ed3 100644 --- a/src/tests/modules/smtp/smtp_stringparse/tls_stringparse.unlang +++ b/src/tests/modules/smtp/smtp_stringparse/tls_stringparse.unlang @@ -32,7 +32,8 @@ echo $?"` == "1") { test_fail } -if !(`/bin/sh -c "grep -E 'Subject: for Bob' build/ci/exim4/mail/stringparse_test_receiver"`) { +if !(`/bin/sh -c "cat build/ci/exim4/mail/stringparse_test_receiver | \ +grep -E 'Subject: for Bob'"`) { test_fail } diff --git a/src/tests/modules/smtp/tls_delivery.unlang b/src/tests/modules/smtp/tls_delivery.unlang index f619e84f757d9..eb0526c97e236 100644 --- a/src/tests/modules/smtp/tls_delivery.unlang +++ b/src/tests/modules/smtp/tls_delivery.unlang @@ -64,9 +64,9 @@ done ;"` == "found")) { # Pull out the base64 encoded test, decode it, trim line endings # Compare the result with the expected output # -if !(`/bin/sh -c "grep -E '^[A-Za-z0-9+/]{4}*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$' build/ci/exim4/mail/smtp_delivery_receiver | \ - base64 -d | tr -d '\r\n' | \ - grep -f build/ci/exim4/testfile"`){ +if !(`/bin/sh -c "cat build/ci/exim4/mail/smtp_delivery_receiver | \ +grep -E '^[A-Za-z0-9+/]{4}*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$' | base64 -d | tr -d '\r\n' | \ +grep -f build/ci/exim4/testfile"`){ test_fail }