[PATCH 2/2] python test "compare message ids"
authorPatrick Totzke <patricktotzke@googlemail.com>
Mon, 2 Jan 2012 14:51:27 +0000 (14:51 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:30 +0000 (09:41 -0800)
84/f11cd1d37bf789605a67b59a7f3ff3a91705cc [new file with mode: 0644]

diff --git a/84/f11cd1d37bf789605a67b59a7f3ff3a91705cc b/84/f11cd1d37bf789605a67b59a7f3ff3a91705cc
new file mode 100644 (file)
index 0000000..15fd97b
--- /dev/null
@@ -0,0 +1,93 @@
+Return-Path: <patricktotzke@googlemail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7ECF2429E21\r
+       for <notmuch@notmuchmail.org>; Mon,  2 Jan 2012 06:51:47 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id bNCuUGNmBgR6 for <notmuch@notmuchmail.org>;\r
+       Mon,  2 Jan 2012 06:51:47 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+       [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id CB848431FD0\r
+       for <notmuch@notmuchmail.org>; Mon,  2 Jan 2012 06:51:46 -0800 (PST)\r
+Received: by wibhq2 with SMTP id hq2so10052053wib.26\r
+       for <notmuch@notmuchmail.org>; Mon, 02 Jan 2012 06:51:45 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=googlemail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=iAX4eLl25m3vYSOAnNh0jwQvKr6eCS8jRw4HXKtuh1A=;\r
+       b=AvZuBcbzCGbFOMjzU0KknJVrEMHBPed1U+ioB0lCPwaX1SoEmWVfBfOfIdfwi0b3Cg\r
+       V/gJey8ZKH5r6V0iq2wpNUeraorD9k8mAo9m8HHOGnWV9h4PEHODlKnDgq9H88PQJlyP\r
+       8Qtcp7VJTyIwwmI+75jSQprmaDdffk+Sh607w=\r
+Received: by 10.180.91.201 with SMTP id cg9mr106994491wib.15.1325515905614;\r
+       Mon, 02 Jan 2012 06:51:45 -0800 (PST)\r
+Received: from localhost (cpc1-sgyl2-0-0-cust548.18-2.cable.virginmedia.com.\r
+       [82.41.10.37])\r
+       by mx.google.com with ESMTPS id m13sm50905123wbh.0.2012.01.02.06.51.43\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 02 Jan 2012 06:51:44 -0800 (PST)\r
+From: Patrick Totzke <patricktotzke@googlemail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] python test "compare message ids"\r
+Date: Mon,  2 Jan 2012 14:51:27 +0000\r
+Message-Id: <1325515887-15201-2-git-send-email-patricktotzke@gmail.com>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <1325515887-15201-1-git-send-email-patricktotzke@gmail.com>\r
+References: <20120102144722.18163.37346@brick.lan>\r
+       <1325515887-15201-1-git-send-email-patricktotzke@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 02 Jan 2012 14:51:47 -0000\r
+\r
+Introduces a second (trivial) test for the python\r
+bindings that searches for message ids and compares\r
+the output with that of `notmuch search`.\r
+---\r
+ test/python |   13 +++++++++++++\r
+ 1 files changed, 13 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/python b/test/python\r
+index c318cc1..6018c2d 100755\r
+--- a/test/python\r
++++ b/test/python\r
+@@ -15,4 +15,17 @@ for t in q_new.search_threads():\r
+ EOF\r
+ notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED\r
+ test_expect_equal_file OUTPUT EXPECTED\r
++\r
++test_begin_subtest "compare message ids"\r
++test_python <<EOF\r
++import notmuch\r
++db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)\r
++q_new = notmuch.Query(db, 'tag:inbox')\r
++q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)\r
++for m in q_new.search_messages():\r
++    print m.get_message_id()\r
++EOF\r
++notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
+ test_done\r
+-- \r
+1.7.5.4\r
+\r