From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id E380D6DE12EB for ; Sun, 26 May 2019 15:16:24 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.177 X-Spam-Level: X-Spam-Status: No, score=-0.177 tagged_above=-999 required=5 tests=[AWL=0.024, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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 nykh5zcH0Gdt for ; Sun, 26 May 2019 15:16:24 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id 272376DE135E for ; Sun, 26 May 2019 15:16:20 -0700 (PDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1558908978; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=nKEu9Rb8dbkkCE7EMXZLoSCzqfrOSHicdh37Txk04C8=; b=CATTB+N38L9qHgCehMZSxENXyvh36TahOD8IVwHiOw4L3REA/HZOD/+e 1IzR+rf7FoU7RKALrZUxNaQAt7InAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1558908978; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=nKEu9Rb8dbkkCE7EMXZLoSCzqfrOSHicdh37Txk04C8=; b=wgSIbY5nxFDzuJOK6s37oNEDyh1m7IatlcCDucMRwn5gTXHeIZQXiql1 yd0mabUEN5Ezzqg1LLBUHTYGmGKD04awf/E/MjRdbLMyHVdQfb+dMwCtqF Jw6+kvcmw6eqtRqqwKMKmtDZr++UGNcOaT636ROa1RlzNX0sQeqdPNbj3a q0MBOy+mllmd/+9719d3gI24+A+zV2Ez2zRMtfhMBw62rfjmBS38suhLMh 2Ao9NzsIsuZrZeNsc0oHanblmjZZqnx8rf7y9tA+KgAclSpiRQxngVJq6R BlPaH+t72fBrxwh4qv2LqblKGsNlc2ots+o7Il6iV9YQ6ZAinarBsA== Received: from fifthhorseman.net (cpe-74-71-53-242.nyc.res.rr.com [74.71.53.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id 37821F9A7 for ; Sun, 26 May 2019 18:16:18 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 8AF43213EB; Sun, 26 May 2019 18:16:14 -0400 (EDT) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH v2 14/17] test: ensure that protected headers appear in notmuch-emacs search as expected Date: Sun, 26 May 2019 18:16:07 -0400 Message-Id: <20190526221610.2833-15-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190526221610.2833-1-dkg@fifthhorseman.net> References: <20190526221610.2833-1-dkg@fifthhorseman.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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: Sun, 26 May 2019 22:16:25 -0000 We initially test only notmuch-search; tests for other functionality come in different patchsets later. Signed-off-by: Daniel Kahn Gillmor --- test/T358-emacs-protected-headers.sh | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 test/T358-emacs-protected-headers.sh diff --git a/test/T358-emacs-protected-headers.sh b/test/T358-emacs-protected-headers.sh new file mode 100755 index 00000000..56ac06ca --- /dev/null +++ b/test/T358-emacs-protected-headers.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +test_description="emacs interface" +. $(dirname "$0")/test-lib.sh || exit 1 + +# testing protected headers with emacs +add_gnupg_home +add_email_corpus protected-headers + +test_begin_subtest "notmuch-search should show not unindexed protected subject header in emacs" +test_emacs '(notmuch-search "id:protected-header@crypto.notmuchmail.org") + (notmuch-test-wait) + (test-output)' +cat <EXPECTED + 2000-01-01 [1/1] test_suite@notmuchmail.org Subject Unavailable (encrypted inbox unread) +End of search results. +EOF +test_expect_equal_file EXPECTED OUTPUT + +# protected headers should behave differently after re-indexing +test_begin_subtest 'defaulting to indexing cleartext' +test_expect_success 'notmuch config set index.decrypt true' +test_begin_subtest 'try reindexing protected header message' +test_expect_success 'notmuch reindex id:protected-header@crypto.notmuchmail.org' + +test_begin_subtest "notmuch-search should show indexed protected subject header in emacs" +test_emacs '(notmuch-search "id:protected-header@crypto.notmuchmail.org") + (notmuch-test-wait) + (test-output)' +cat <EXPECTED + 2000-01-01 [1/1] test_suite@notmuchmail.org This is a protected header (encrypted inbox unread) +End of search results. +EOF +test_expect_equal_file EXPECTED OUTPUT + +test_done -- 2.20.1