Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 34F82431FBC for ; Fri, 25 May 2012 19:42:10 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WuQ4agmCzcIB for ; Fri, 25 May 2012 19:42:09 -0700 (PDT) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 88087431FB6 for ; Fri, 25 May 2012 19:42:09 -0700 (PDT) Received: by pbbrr13 with SMTP id rr13so2928683pbb.26 for ; Fri, 25 May 2012 19:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:to:subject:in-reply-to:references:mime-version :content-type:content-disposition:content-transfer-encoding; bh=SCbHqS54x4FxK+PCN9RkT1XrGTHNnsbB189ErBGWl30=; b=B0KVH/K4T30ZhH7EM8wphGfbEJ9HJVLwPZ8N8OuNBhEYvnVlYJMXN35O1lvcA+PoE4 MfHkOykIQqvO/+yrd76uC2y7HrB/xuIqMNfNFcoC6oyBuqXjCZrROUcz6btPrjmmG9TO v3pKNQ7yiCrJU5jX6GXffIXGMWHyIwgTEpYRWptjakX8ymssDQ6Gfgv6V3WyoPXOHI90 JX67cNU4OMUzquk6wpK00peQ9erbPWqNrpPJxgXvACDLuo4yFpIXgdavtvzzkmgrhnvw ZH/kV1Te9xN6l5SPlQncDRsVUbzRYG+9e/nhEd+MNZDjI+/mqMvBT/oJ7ufckCrk0RNd YXaQ== Received: by 10.68.201.169 with SMTP id kb9mr3186099pbc.101.1338000128683; Fri, 25 May 2012 19:42:08 -0700 (PDT) Received: from localhost (215.42.233.220.static.exetel.com.au. [220.233.42.215]) by mx.google.com with ESMTPS id nw7sm10970332pbb.73.2012.05.25.19.42.05 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 May 2012 19:42:07 -0700 (PDT) Date: Sat, 26 May 2012 12:42:02 +1000 Message-ID: <20120526124202.GC2328@hili.localdomain> From: Peter Wang To: notmuch@notmuchmail.org Subject: Re: [PATCH 06/10] Fix test/count on FreeBSD In-Reply-To: <1337953411-21000-7-git-send-email-pioto@pioto.org> References: <1337953411-21000-1-git-send-email-pioto@pioto.org> <1337953411-21000-7-git-send-email-pioto@pioto.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2012 02:42:10 -0000 On Fri, 25 May 2012 09:43:27 -0400, Mike Kelly 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