test: wrap 'wc -l' results in arithmetic evaluation to strip whitespace
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 4 Jan 2017 22:35:23 +0000 (00:35 +0200)
committerDavid Bremner <david@tethera.net>
Sat, 28 Jan 2017 02:02:36 +0000 (22:02 -0400)
Some new unwrapped 'wc -l's have been added since Jani's 60e79e3a9f1c8

test/T070-insert.sh
test/T580-thread-search.sh

index 7e04a23d93e2b0817f8c847bc7840bc0dbfb1b2a..3dd76737c53017a8e0e9665c1b4016da7a4defd7 100755 (executable)
@@ -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"
index 6f7106db475a60cb472f073cd7b391ef56b44434..512559a3aff90086809247e2cb3e8ef0a6451e32 100755 (executable)
@@ -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