aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTomi Ollila <tomi.ollila@iki.fi>2022-02-21 00:30:45 +0200
committerDavid Bremner <david@tethera.net>2022-02-21 09:36:39 -0400
commit08da7f25e5ebf6536002c9a544d687a1d28aea3e (patch)
treeef06e62e06dcead57cc24e6deb7ed8fdf98c9a5f /test
parent999706c4d506f77fcef2a3d5d1c6bfe65c8db791 (diff)
removed use of 'echo -n' (and echo -n -e ...)
In most cases used printf %s ... instead. echo -n > file lines to create empty / truncate files were changed to : > file lines, like done in in test-lib-emacs.sh And one echo -n " " replaced with use of sed "s/^/ /" in next line.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T090-search-output.sh2
-rwxr-xr-xtest/T190-multipart.sh2
-rwxr-xr-xtest/T380-atomicity.sh4
3 files changed, 4 insertions, 4 deletions
diff --git a/test/T090-search-output.sh b/test/T090-search-output.sh
index bf28d220..0d85c609 100755
--- a/test/T090-search-output.sh
+++ b/test/T090-search-output.sh
@@ -435,7 +435,7 @@ test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search for non-existent message prints nothing"
notmuch search "no-message-matches-this" > OUTPUT
-echo -n >EXPECTED
+: >EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search --format=json for non-existent message prints proper empty json"
diff --git a/test/T190-multipart.sh b/test/T190-multipart.sh
index 3545a599..d3b7f87c 100755
--- a/test/T190-multipart.sh
+++ b/test/T190-multipart.sh
@@ -683,7 +683,7 @@ test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED)"
test_begin_subtest "'notmuch show --part' does not corrupt a part with CRLF pair"
notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out
-echo -n -e "\xEF\x0D\x0A" > crlf.expected
+printf "\xEF\x0D\x0A" > crlf.expected
test_expect_equal_file crlf.out crlf.expected
diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh
index afe49d93..0f9e6d2e 100755
--- a/test/T380-atomicity.sh
+++ b/test/T380-atomicity.sh
@@ -71,8 +71,8 @@ if test_require_external_prereq gdb; then
# Check output against golden output
outcount=$(cat outcount)
- echo -n > searchall
- echo -n > expectall
+ : > searchall
+ : > expectall
for ((i = 0; i < $outcount; i++)); do
if ! cmp -s search.$i expected; then
# Find the range of interruptions that match this output