Skip to content

Commit

Permalink
Revert "we don't need to do "cat X | foo" when we can do "foo X""
Browse files Browse the repository at this point in the history
This reverts commit 7771539.

revert until we have time to track it down a bit more
  • Loading branch information
alandekok committed Oct 15, 2023
1 parent 7771539 commit e3eb1e4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/tests/modules/linelog/linelog.unlang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/tests/modules/smtp/smtp_attachment/tls_attachment.unlang
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 2 additions & 1 deletion src/tests/modules/smtp/smtp_crln/tls_crln.unlang
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
6 changes: 3 additions & 3 deletions src/tests/modules/smtp/tls_delivery.unlang
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit e3eb1e4

Please sign in to comment.