unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Cc: tomi.ollila@iki.fi
Subject: [PATCH] test: wrap 'wc -l' results in arithmetic evaluation to strip whitespace
Date: Thu,  5 Jan 2017 00:35:23 +0200	[thread overview]
Message-ID: <1483569323-956-1-git-send-email-tomi.ollila@iki.fi> (raw)

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 57472b913964..7fb3b87e4584 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 6f7106db475a..512559a3aff9 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
-- 
2.8.2

             reply	other threads:[~2017-01-04 22:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 22:35 Tomi Ollila [this message]
2017-01-18 18:00 ` [PATCH] test: wrap 'wc -l' results in arithmetic evaluation to strip whitespace Jani Nikula
2017-01-28  2:30 ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483569323-956-1-git-send-email-tomi.ollila@iki.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).