test: wrap 'wc -l' results in arithmetic evaluation to strip whitespace

Some new unwrapped 'wc -l's have been added since Jani's 60e79e3a9f
This commit is contained in:
Tomi Ollila 2017-01-05 00:35:23 +02:00 committed by David Bremner
parent 70519319b5
commit f8d5c9b80e
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ test_expect_equal_json "$output" "$expected"
test_begin_subtest "Insert duplicate message" test_begin_subtest "Insert duplicate message"
notmuch insert +duptag -unread < "$gen_msg_filename" 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_expect_equal "$output" 2
test_begin_subtest "Duplicate message does not change tags" test_begin_subtest "Duplicate message does not change tags"

View file

@ -15,7 +15,7 @@ count=0
success=0 success=0
for id in $(notmuch search --output=messages '*'); do for id in $(notmuch search --output=messages '*'); do
count=$((count +1)) count=$((count +1))
matches=$(notmuch search --output=threads "$id" | wc -l) matches=$((`notmuch search --output=threads "$id" | wc -l`))
if [ "$matches" = 1 ]; then if [ "$matches" = 1 ]; then
success=$((success + 1)) success=$((success + 1))
fi fi