From: Peter Wang <novalazy@gmail.com>
To: notmuch@notmuchmail.org
Subject: Re: [PATCH 06/10] Fix test/count on FreeBSD
Date: Sat, 26 May 2012 12:42:02 +1000 [thread overview]
Message-ID: <20120526124202.GC2328@hili.localdomain> (raw)
In-Reply-To: <1337953411-21000-7-git-send-email-pioto@pioto.org>
On Fri, 25 May 2012 09:43:27 -0400, Mike Kelly <pioto@pioto.org> wrote:
> FreeBSD's `wc -l` includes some white space in front of the number, so
> trim it off.
> ---
> test/count | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/test/count b/test/count
> index 300b171..618dbb9 100755
> --- a/test/count
> +++ b/test/count
> @@ -8,22 +8,22 @@ SEARCH="\"*\""
>
> test_begin_subtest "message count is the default for notmuch count"
> test_expect_equal \
> - "`notmuch search --output=messages ${SEARCH} | wc -l`" \
> + "`notmuch search --output=messages ${SEARCH} | wc -l |sed 's/^[[:space:]]*//'`" \
> "`notmuch count ${SEARCH}`"
You could perform a proper integer comparison like:
test_expect_success "message count is the default for notmuch count" '
test "`notmuch search --output=messages ${SEARCH} | wc -l`" \
-eq "`notmuch count ${SEARCH}`"
'
Peter
next prev parent reply other threads:[~2012-05-26 2:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 13:43 FreeBSD Support Patches Mike Kelly
2012-05-25 13:43 ` [PATCH 01/10] Add support for FreeBSD Mike Kelly
2012-05-25 13:43 ` [PATCH 02/10] Fix compilation of symbol-test on FreeBSD Mike Kelly
2012-05-25 13:43 ` [PATCH 03/10] Fix compilation of smtp-dummy " Mike Kelly
2012-05-26 9:52 ` Jani Nikula
2012-05-25 13:43 ` [PATCH 04/10] Test against man pages in our source dir, not installed ones Mike Kelly
2012-05-25 13:43 ` [PATCH 05/10] Make test/basic more portable Mike Kelly
2012-05-25 13:43 ` [PATCH 06/10] Fix test/count on FreeBSD Mike Kelly
2012-05-26 2:42 ` Peter Wang [this message]
2012-05-25 13:43 ` [PATCH 07/10] emacs tests require emacs Mike Kelly
2012-05-25 13:43 ` [PATCH 08/10] test/atomicity: use a more portable 'cp' form Mike Kelly
2012-05-25 13:43 ` [PATCH 09/10] test/crypto: current tests require emacs Mike Kelly
2012-05-25 13:43 ` [PATCH 10/10] tests: bsd sed doesn't allow replacing '\n' Mike Kelly
2012-05-25 14:15 ` FreeBSD Support Patches Dmitry Kurochkin
2012-05-25 20:02 ` Mike Kelly
2012-05-26 1:07 ` Dmitry Kurochkin
2012-05-25 20:53 ` Tomi Ollila
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=20120526124202.GC2328@hili.localdomain \
--to=novalazy@gmail.com \
--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).