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