From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1923A431FDA for ; Mon, 2 Sep 2013 22:19:18 -0700 (PDT) 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=[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 bfXjYHtr0agA for ; Mon, 2 Sep 2013 22:19:10 -0700 (PDT) Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 79063431FDB for ; Mon, 2 Sep 2013 22:19:09 -0700 (PDT) Received: by mail-ee0-f42.google.com with SMTP id b45so2732535eek.29 for ; Mon, 02 Sep 2013 22:19:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2MVD0kfw/VpEHl2Bt7NOqEu9VwGCzas/tlONel/gNfE=; b=BX+Eqwo9eucrpqSXfimSianj7FvUiT+V92Q3TVbDoZAxwcbDZ31eW/libHvTrNthH5 iVaCgji7edZXhwBJT0jhjdBxPcAzS6ib7YITamFowY1AkLAGNrBqBaihuE4mcD29dw50 zTaDqd+cTUoQsQPpperhTiD9RQr9kNbDapIY+Mx3GqhYbmJ9/xUeqbU6CmCdK6Ojh5CD NgFbMmCsjuDmtUyKQoj0/uIKmbKWSQSXevC9CENnYeE0wCepBz4VUDjO0JJdfoJF8buD RR6l6DQ7zvqTyrFH3rF0vGhhqdGQbX1I0OIQ/IjikGbmD489T0ivUEJ9V5SzG9l+Obv4 XgOQ== X-Gm-Message-State: ALoCoQmEyt12CYxYE0/cI4N4axLCVde+9z9YTVMftqx/WkcpRaQRe+OtMlXrOH3h0WHkN9qtnBfG X-Received: by 10.14.3.9 with SMTP id 9mr319544eeg.72.1378185548250; Mon, 02 Sep 2013 22:19:08 -0700 (PDT) Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. [88.195.111.91]) by mx.google.com with ESMTPSA id a1sm28245286eem.1.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Sep 2013 22:19:07 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 2/2] test: improve insert test reliability by checking message-id instead of count Date: Tue, 3 Sep 2013 08:19:03 +0300 Message-Id: <1378185543-25271-2-git-send-email-jani@nikula.org> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1378185543-25271-1-git-send-email-jani@nikula.org> References: <1378170613-3584-1-git-send-email-david@tethera.net> <1378185543-25271-1-git-send-email-jani@nikula.org> 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, 03 Sep 2013 05:19:18 -0000 There isn't a reported issue this would fix. Spotted by reading the test. --- test/insert | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/insert b/test/insert index 9b448e5..550b413 100755 --- a/test/insert +++ b/test/insert @@ -68,14 +68,14 @@ test_expect_equal_json "$output" '["inbox", "unread"]' test_begin_subtest "Insert message, add tag" gen_insert_msg notmuch insert +custom < "$gen_msg_filename" -output=$(notmuch count tag:custom) -test_expect_equal "$output" "1" +output=$(notmuch search --output=messages tag:custom) +test_expect_equal "$output" "id:$gen_msg_id" test_begin_subtest "Insert message, add/remove tags" gen_insert_msg notmuch insert +custom -unread < "$gen_msg_filename" -output=$(notmuch count tag:custom NOT tag:unread) -test_expect_equal "$output" "1" +output=$(notmuch search --output=messages tag:custom NOT tag:unread) +test_expect_equal "$output" "id:$gen_msg_id" test_begin_subtest "Insert message with default tags stays in new/" gen_insert_msg @@ -123,8 +123,8 @@ test_expect_equal "$dirname" "$MAIL_DIR/Drafts/new" test_begin_subtest "Insert message into folder, add/remove tags" gen_insert_msg notmuch insert --folder=Drafts +draft -unread < "$gen_msg_filename" -output=$(notmuch count folder:Drafts tag:draft NOT tag:unread) -test_expect_equal "$output" "1" +output=$(notmuch search --output=messages folder:Drafts tag:draft NOT tag:unread) +test_expect_equal "$output" "id:$gen_msg_id" gen_insert_msg test_expect_code 1 "Insert message into non-existent folder" \ -- 1.8.4.rc3