[PATCH v1 3/3] test: Update tests for :authors_matched and :authors_non_matched.
authorDavid Edmondson <dme@dme.org>
Fri, 24 Oct 2014 08:48:08 +0000 (09:48 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:05:35 +0000 (10:05 -0800)
f2/044bfb4697ce0b13ebd328d6f42cf985d200a9 [new file with mode: 0644]

diff --git a/f2/044bfb4697ce0b13ebd328d6f42cf985d200a9 b/f2/044bfb4697ce0b13ebd328d6f42cf985d200a9
new file mode 100644 (file)
index 0000000..3d1b9bf
--- /dev/null
@@ -0,0 +1,151 @@
+Return-Path: <dme@dme.org>\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 E69D2429E26\r
+       for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 01:48:20 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001]\r
+       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 joHQOvwpGnkt for <notmuch@notmuchmail.org>;\r
+       Fri, 24 Oct 2014 01:48:14 -0700 (PDT)\r
+Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com\r
+ [74.125.82.49])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 43B3B431FD7   for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 01:48:14 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f49.google.com with SMTP id x12so600212wgg.20\r
+       for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 01:48:12 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:user-agent:from:to:subject:date:message-id\r
+       :in-reply-to:references:mime-version:content-type\r
+       :content-transfer-encoding;\r
+       bh=52F0LC4x2r3whZp2mZvlbnVSXrWE8OmeM/qfuXEZ3LM=;\r
+       b=RykuS65+dlMT6iHJPFdtb0hk7p81Q+N1HsRzCk4OArcXgeunzYCV0XLJYfQTTSxNKK\r
+       SZzogmCiuM11DaxN/zV+Qp9m2s1REbrYQsOhLlfXosAhflITrzCTEpY9Lik1bKU//q4E\r
+       KtmXSCkkGTu5ktocFhWNOue/OFrNdvpY5dOIkpy0NYO2b+e/zv6nH0njxKrwqno6Za62\r
+       Y17MyIsXsDCXS7W3xkfaa/3DpRYoR8XC/Af3bNmhtyTTsOcZzrp2Ph+Gs9JJniSsv5zF\r
+       fovRXFTsflGBc+nyLv6A8byrcIG5cOjrfZRyUjZaPz/Wls3XdRs8FCDUULxVjgUE5PPW\r
+       vnxw==\r
+X-Gm-Message-State:\r
+ ALoCoQkziUTCXSPHAa60asnBk29pnYAxt3r0Ywxo0IaR94fhJVe3TryHOgi3/YvQeV7ykL6MOJuV\r
+X-Received: by 10.180.36.134 with SMTP id q6mr2580692wij.56.1414140492889;\r
+       Fri, 24 Oct 2014 01:48:12 -0700 (PDT)\r
+Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net.\r
+       [81.149.164.25])\r
+       by mx.google.com with ESMTPSA id wt3sm4840424wjb.40.2014.10.24.01.48.12\r
+       for <notmuch@notmuchmail.org>\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+       Fri, 24 Oct 2014 01:48:12 -0700 (PDT)\r
+Received: from localhost (30000@localhost [local]);\r
+       by localhost (OpenSMTPD) with ESMTPA id b87c556d;\r
+       for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 08:48:08 +0000 (UTC)\r
+User-Agent: OpenSMTPD enqueuer (Demoostik)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v1 3/3] test: Update tests for :authors_matched and\r
+       :authors_non_matched.\r
+Date: Fri, 24 Oct 2014 09:48:08 +0100\r
+Message-Id: <1414140488-29978-4-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 2.1.1\r
+In-Reply-To: <1414140488-29978-1-git-send-email-dme@dme.org>\r
+References: <1414140488-29978-1-git-send-email-dme@dme.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\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: Fri, 24 Oct 2014 08:48:21 -0000\r
+\r
+---\r
+ test/T160-json.sh            | 4 ++++\r
+ test/T170-sexp.sh            | 4 ++--\r
+ test/T470-missing-headers.sh | 4 ++++\r
+ 3 files changed, 10 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/test/T160-json.sh b/test/T160-json.sh\r
+index c1cf649..d3cf2e7 100755\r
+--- a/test/T160-json.sh\r
++++ b/test/T160-json.sh\r
+@@ -25,6 +25,8 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",\r
+  \"matched\": 1,\r
+  \"total\": 1,\r
+  \"authors\": \"Notmuch Test Suite\",\r
++ \"authors_matched\": \"Notmuch Test Suite\",\r
++ \"authors_non_matched\": \"\",\r
+  \"subject\": \"json-search-subject\",\r
+  \"query\": [\"id:$gen_msg_id\", null],\r
+  \"tags\": [\"inbox\",\r
+@@ -59,6 +61,8 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",\r
+  \"matched\": 1,\r
+  \"total\": 1,\r
+  \"authors\": \"Notmuch Test Suite\",\r
++ \"authors_matched\": \"Notmuch Test Suite\",\r
++ \"authors_non_matched\": \"\",\r
+  \"subject\": \"json-search-utf8-body-sübjéct\",\r
+  \"query\": [\"id:$gen_msg_id\", null],\r
+  \"tags\": [\"inbox\",\r
+diff --git a/test/T170-sexp.sh b/test/T170-sexp.sh\r
+index 667e319..8a57b74 100755\r
+--- a/test/T170-sexp.sh\r
++++ b/test/T170-sexp.sh\r
+@@ -19,7 +19,7 @@ test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :f\r
+ test_begin_subtest "Search message: sexp"\r
+ add_message "[subject]=\"sexp-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"sexp-search-message\""\r
+ output=$(notmuch search --format=sexp "sexp-search-message" | notmuch_search_sanitize)\r
+-test_expect_equal "$output" "((:thread \"0000000000000002\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :subject \"sexp-search-subject\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"\r
++test_expect_equal "$output" "((:thread \"0000000000000002\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :authors_matched \"Notmuch Test Suite\" :authors_non_matched \"\" :subject \"sexp-search-subject\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"\r
\r
+ test_begin_subtest "Show message: sexp, utf-8"\r
+ add_message "[subject]=\"sexp-show-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-show-méssage\""\r
+@@ -44,7 +44,7 @@ test_expect_equal "$output" "((((:id \"$id\" :match t :excluded nil :filename \"\r
+ test_begin_subtest "Search message: sexp, utf-8"\r
+ add_message "[subject]=\"sexp-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-search-méssage\""\r
+ output=$(notmuch search --format=sexp "jsön-search-méssage" | notmuch_search_sanitize)\r
+-test_expect_equal "$output" "((:thread \"0000000000000005\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :subject \"sexp-search-utf8-body-sübjéct\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"\r
++test_expect_equal "$output" "((:thread \"0000000000000005\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :authors_matched \"Notmuch Test Suite\" :authors_non_matched \"\" :subject \"sexp-search-utf8-body-sübjéct\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"\r
\r
\r
+ test_done\r
+diff --git a/test/T470-missing-headers.sh b/test/T470-missing-headers.sh\r
+index cb38301..5d66e7e 100755\r
+--- a/test/T470-missing-headers.sh\r
++++ b/test/T470-missing-headers.sh\r
+@@ -34,6 +34,8 @@ test_expect_equal_json "$output" '\r
+ [\r
+     {\r
+         "authors": "",\r
++        "authors_matched": "",\r
++        "authors_non_matched": "",\r
+         "date_relative": "2001-01-05",\r
+         "matched": 1,\r
+         "subject": "",\r
+@@ -48,6 +50,8 @@ test_expect_equal_json "$output" '\r
+     },\r
+     {\r
+         "authors": "Notmuch Test Suite",\r
++        "authors_matched": "Notmuch Test Suite",\r
++        "authors_non_matched": "",\r
+         "date_relative": "1970-01-01",\r
+         "matched": 1,\r
+         "subject": "",\r
+-- \r
+2.1.1\r
+\r