Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 46C756DE0C81 for ; Mon, 14 Dec 2015 09:23:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.312 X-Spam-Level: X-Spam-Status: No, score=-0.312 tagged_above=-999 required=5 tests=[AWL=0.258, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vaPcKgiKvIDr for ; Mon, 14 Dec 2015 09:23:15 -0800 (PST) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by arlo.cworth.org (Postfix) with ESMTPS id 34D786DE176C for ; Mon, 14 Dec 2015 09:23:15 -0800 (PST) Received: by mail-wm0-f45.google.com with SMTP id n186so128394355wmn.1 for ; Mon, 14 Dec 2015 09:23:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=Okd8bg293zOfubW+BOKLyHWR7ODw798ORLVT7+cVdx4=; b=Sky6SzS9Tb91IerAvVYZJmzh9nN4fS4ukspif3LPvJrRz4pOrcTecAedFfHVgvBrQO AisnmGPtV994woGqNyQzXyM5wh2DXaOv3sgeRqnQGRK3LDyttxTOIoiGTh1EnJCWRtKJ uOPINSBL23nFGyCeoQfBZN4wFIvkHmrsAPXTljXFmGb7vrOw+9GqHKg+mqOgGaeKtrAp 6jamE9Kjeip3Sq9hyHE6XW1hg1TRelcemTW3EJxnrgvdxUNxYmSmtDVr5QMqgcQOrYip 5SRIw3438w6L+JBNt0Y0DYXyU8kw+6D/oPamPJ/LksbB2ZSH41qawFI6OY+0Zpl2AMxx QPRw== X-Received: by 10.194.116.133 with SMTP id jw5mr38690368wjb.110.1450113791180; Mon, 14 Dec 2015 09:23:11 -0800 (PST) Received: from localhost (92.40.77.76.threembb.co.uk. [92.40.77.76]) by smtp.gmail.com with ESMTPSA id ft4sm30411129wjb.37.2015.12.14.09.23.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Dec 2015 09:23:10 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH v2 (rebased) 3/3] test: Update tests for 'authors_matched' and authors_non_matched'. Date: Mon, 14 Dec 2015 17:22:46 +0000 Message-Id: <1450113766-20518-4-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450113766-20518-1-git-send-email-markwalters1009@gmail.com> References: <1450113766-20518-1-git-send-email-markwalters1009@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 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: Mon, 14 Dec 2015 17:23:17 -0000 From: David Edmondson --- test/T160-json.sh | 9 +++++++++ test/T170-sexp.sh | 4 ++-- test/T470-missing-headers.sh | 8 ++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/test/T160-json.sh b/test/T160-json.sh index b346f37..3958841 100755 --- a/test/T160-json.sh +++ b/test/T160-json.sh @@ -25,6 +25,10 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\", \"matched\": 1, \"total\": 1, \"authors\": \"Notmuch Test Suite\", + \"authors_matched\": [ + \"Notmuch Test Suite\" + ], + \"authors_non_matched\": [], \"subject\": \"json-search-subject\", \"query\": [\"id:$gen_msg_id\", null], \"tags\": [\"inbox\", @@ -59,6 +63,11 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\", \"matched\": 1, \"total\": 1, \"authors\": \"Notmuch Test Suite\", + \"authors\": \"Notmuch Test Suite\", + \"authors_matched\": [ + \"Notmuch Test Suite\" + ], + \"authors_non_matched\": [], \"subject\": \"json-search-utf8-body-sübjéct\", \"query\": [\"id:$gen_msg_id\", null], \"tags\": [\"inbox\", diff --git a/test/T170-sexp.sh b/test/T170-sexp.sh index 800ebc6..6c71491 100755 --- a/test/T170-sexp.sh +++ b/test/T170-sexp.sh @@ -19,7 +19,7 @@ test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :f test_begin_subtest "Search message: sexp" add_message "[subject]=\"sexp-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"sexp-search-message\"" output=$(notmuch search --format=sexp "sexp-search-message" | notmuch_search_sanitize) -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\")))" +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\")))" test_begin_subtest "Show message: sexp, utf-8" 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\"" @@ -44,7 +44,7 @@ test_expect_equal "$output" "((((:id \"$id\" :match t :excluded nil :filename \" test_begin_subtest "Search message: sexp, utf-8" 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\"" output=$(notmuch search --format=sexp "jsön-search-méssage" | notmuch_search_sanitize) -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\")))" +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\")))" test_done diff --git a/test/T470-missing-headers.sh b/test/T470-missing-headers.sh index e256c10..66c2a1d 100755 --- a/test/T470-missing-headers.sh +++ b/test/T470-missing-headers.sh @@ -34,6 +34,10 @@ test_expect_equal_json "$output" ' [ { "authors": "", + "authors_matched": [ + "" + ], + "authors_non_matched": [], "date_relative": "2001-01-05", "matched": 1, "subject": "", @@ -48,6 +52,10 @@ test_expect_equal_json "$output" ' }, { "authors": "Notmuch Test Suite", + "authors_matched": [ + "Notmuch Test Suite" + ], + "authors_non_matched": [], "date_relative": "1970-01-01", "matched": 1, "subject": "", -- 2.1.4