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 1C760431FB6 for ; Tue, 4 Dec 2012 15:04:29 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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 hUfUVEivfuzQ for ; Tue, 4 Dec 2012 15:04:28 -0800 (PST) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D171B431FAE for ; Tue, 4 Dec 2012 15:04:27 -0800 (PST) Received: by mail-ee0-f53.google.com with SMTP id c50so2976152eek.26 for ; Tue, 04 Dec 2012 15:04:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:in-reply-to:organization:references :user-agent:x-face:face:x-pgp:x-pgp-fp:date:message-id:mime-version :content-type; bh=u0LD3WivIfOhPL3atoskyCoPNIG1E+pLO96zYm/YYXk=; b=p3hp9Btm/BX5qBtwHDZ7hXn2JMIxSL7DAbNhGZSrNJfCjrilSkHRwPmgJd5cocOJrd dQ9m0hSd1hfwT2qCiF2CJcA5ogfSiJMb9bkbDYAgpHQiN6maQzDoRWg851fp11q7m2t3 6mNZv4yGGqoF6xmmUhj0J009Mk3D84Rlr2FuB2MrI+XqGM+9oZPcYV87BPSSIsX53kXt CNDV7yF6KTB/VJ/BuCAewwKol9yDAp0TnYVoulmdJT5g85WLzXorAGjVmgVHDqUvSPxs o6dtYUsPd9WGHqqfOHQYqN49yksK27Js3XDrxg/MAsiU4IWaJbMsxu7kA9ptYAAEj5m/ SbRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:in-reply-to:organization:references :user-agent:x-face:face:x-pgp:x-pgp-fp:date:message-id:mime-version :content-type:x-gm-message-state; bh=u0LD3WivIfOhPL3atoskyCoPNIG1E+pLO96zYm/YYXk=; b=R+QlhdkkQoPnfIofvgk3fkQAPdDbBcDqUhLwnD5RCa7v14CdakveUl/BCcrST5EYYC xTwJzN6vWDRRbWuW6xWFOJQP83UlF5P398B+h9bHueNce2kv5PzBuuzFi568OpNyUmDh UrzsQy9kLZLtizLNQkN+ErT/eeRfP1d8tDp+S9JEycXJ1/t8LVfz0XzSW9HfJnfbUum7 /JYptdR18BfbUIptQd1t0iVr5iHuJmd4mwBTI74um4C5samxMRUqMe9dOGIFf9WdPgZ7 q4uHIemhyOsSnqAL5R1VMchiBN9vSaMHa+xevCHjvoVoR5ETqOg0YmBkSXeFn9wqGYtv 8XHA== Received: by 10.14.208.137 with SMTP id q9mr53317980eeo.28.1354662266603; Tue, 04 Dec 2012 15:04:26 -0800 (PST) Received: from mpn-glaptop ([2620:0:105f:5:8c95:2fd8:feb2:1f3c]) by mx.google.com with ESMTPS id k2sm5413621eep.15.2012.12.04.15.04.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Dec 2012 15:04:25 -0800 (PST) Sender: Michal Nazarewicz From: Michal Nazarewicz To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [PATCH 1/3] test: fix count test In-Reply-To: <0ca075ab5fb0d886d0235c1f0549db8b0b14c9b5.1354656085.git.jani@nikula.org> Organization: http://mina86.com/ References: <0ca075ab5fb0d886d0235c1f0549db8b0b14c9b5.1354656085.git.jani@nikula.org> User-Agent: Notmuch/ (http://notmuchmail.org) Emacs/24.2.50.1 (x86_64-unknown-linux-gnu) X-Face: PbkBB1w#)b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AAAAElFTkSuQmCC X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 Date: Wed, 05 Dec 2012 00:04:20 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Gm-Message-State: ALoCoQll6laYoKpAh56sLieFOYOMyjMUl9OuRwAloxmoHD0nbXnWhgJbckWZhDLMP/O+uGETszkIcTSTX2dZs2NJaBYYcx+RaL9I/Hrx6MW74rScawbPe0GI507AkU4OGL+/iYzIjgWdaS1PGGx5g6mOil8psRqHsUvESZTFW84FmcevVAlCSPIJiiMH6x6IMvYrYHE0uWymTTMbpNbATNuhEoAQl/l2/Q== 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: Tue, 04 Dec 2012 23:04:29 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Dec 04 2012, Jani Nikula wrote: > The quoting for ${SEARCH} is broken when it's supposed to be '*', and Why is it broken? It does not appear to be broken to me and in fact the test passes. > it seems tricky to get it right. Just drop the variable and use '*' > directly. Before this, none of the messages ever matched, and the test > was comparing zeros. > --- > test/count | 23 ++++++++++------------- > 1 file changed, 10 insertions(+), 13 deletions(-) > > diff --git a/test/count b/test/count > index 300b171..8e587ff 100755 > --- a/test/count > +++ b/test/count > @@ -4,37 +4,34 @@ test_description=3D'"notmuch count" for messages and th= reads' >=20=20 > add_email_corpus >=20=20 > -SEARCH=3D"\"*\"" > - > test_begin_subtest "message count is the default for notmuch count" > test_expect_equal \ > - "`notmuch search --output=3Dmessages ${SEARCH} | wc -l`" \ > - "`notmuch count ${SEARCH}`" > + "`notmuch search --output=3Dmessages '*' | wc -l`" \ > + "`notmuch count '*'`" >=20=20 > test_begin_subtest "message count with --output=3Dmessages" > test_expect_equal \ > - "`notmuch search --output=3Dmessages ${SEARCH} | wc -l`" \ > - "`notmuch count --output=3Dmessages ${SEARCH}`" > + "`notmuch search --output=3Dmessages '*' | wc -l`" \ > + "`notmuch count --output=3Dmessages '*'`" >=20=20 > test_begin_subtest "thread count with --output=3Dthreads" > test_expect_equal \ > - "`notmuch search --output=3Dthreads ${SEARCH} | wc -l`" \ > - "`notmuch count --output=3Dthreads ${SEARCH}`" > + "`notmuch search --output=3Dthreads '*' | wc -l`" \ > + "`notmuch count --output=3Dthreads '*'`" >=20=20 > test_begin_subtest "thread count is the default for notmuch search" > test_expect_equal \ > - "`notmuch search ${SEARCH} | wc -l`" \ > - "`notmuch count --output=3Dthreads ${SEARCH}`" > + "`notmuch search '*' | wc -l`" \ > + "`notmuch count --output=3Dthreads '*'`" >=20=20 > -SEARCH=3D"from:cworth and not from:cworth" > test_begin_subtest "count with no matching messages" > test_expect_equal \ > "0" \ > - "`notmuch count --output=3Dmessages ${SEARCH}`" > + "`notmuch count --output=3Dmessages from:cworth and not from:cworth`" >=20=20 > test_begin_subtest "count with no matching threads" > test_expect_equal \ > "0" \ > - "`notmuch count --output=3Dthreads ${SEARCH}`" > + "`notmuch count --output=3Dthreads from:cworth and not from:cworth`" >=20=20 > test_done --=20 Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz = (o o) ooo +------------------ooO--(_)--Ooo-- --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJQvoF0AAoJECBgQBJQdR/09hQP/R0VhofnHUmYXItJWr2bOBZB 3ExhvQLH3/vOeKSf0kwU/rBwUod2yEVBC9nSJyztPmi2vDUI7QBwxi2IEOG7ophW 8ko4lBk6ibc6f48eqBHExP1eB6MIUn2L/oQA+uED/WmTac9nVXP566+0t+SKpYBJ z26peegUP20JNHk4RK3EPBw/xP54MVwBmjD8I4TQFUv5nXUMoftrQ7Ax4g4QmFdq a2IFhCGf6w5owWEpqMV/gr1DBGOQGFtGZicHascA/SIIZ/5eqnqdC9c25TS5bU84 fOn0N8L9uKYn04Gw6vcmKcTqdNwRM2e3jDCKS0AAdIuw7zuAsG3yxHaqGF7MxwzD sJzJg+ml49ZKuQIVCtz5jkTFgeIrLjokwbQuREivDpQkW3Uc8Em6KfzB+Cibq3Bw 65mfSCWlacWfaPWNYY/2Lb+y5e6NMN0JTwZfLSuJRcBjM+FfEuazsQXs1QDd0uJS Q2NzRsa1gm3dcodqV4pHVWtAOgIRwuVOKKFa5m7aqPQPPxO8WcQb2Mp1u0CfKWnV sOTYEQ6mgKLTmFKjOpvsaANgsNhGLktQViYmeR7B7jrhiQKGIExNYgfH9DIIJeMh sH3zfoW5uJn6w+Z1h79O7E55XiQM/xKF5c1BHJ3KbIC9Emz+DhlkVaqNR2xkqe8/ sn3kud6sKU/ZnCi0CZ0S =ZF8K -----END PGP SIGNATURE----- --==-=-=-- --=-=-=--