From f8d5c9b80ebeac65a93c80ec2a0d3e514f8ea771 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Thu, 5 Jan 2017 00:35:23 +0200 Subject: [PATCH] test: wrap 'wc -l' results in arithmetic evaluation to strip whitespace Some new unwrapped 'wc -l's have been added since Jani's 60e79e3a9f1c8 --- test/T070-insert.sh | 2 +- test/T580-thread-search.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index 7e04a23d..3dd76737 100755 --- a/test/T070-insert.sh +++ b/test/T070-insert.sh @@ -60,7 +60,7 @@ test_expect_equal_json "$output" "$expected" test_begin_subtest "Insert duplicate message" notmuch insert +duptag -unread < "$gen_msg_filename" -output=$(notmuch search --output=files "subject:insert-subject" | wc -l) +output=$((`notmuch search --output=files "subject:insert-subject" | wc -l`)) test_expect_equal "$output" 2 test_begin_subtest "Duplicate message does not change tags" diff --git a/test/T580-thread-search.sh b/test/T580-thread-search.sh index 6f7106db..512559a3 100755 --- a/test/T580-thread-search.sh +++ b/test/T580-thread-search.sh @@ -15,7 +15,7 @@ count=0 success=0 for id in $(notmuch search --output=messages '*'); do count=$((count +1)) - matches=$(notmuch search --output=threads "$id" | wc -l) + matches=$((`notmuch search --output=threads "$id" | wc -l`)) if [ "$matches" = 1 ]; then success=$((success + 1)) fi