From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6Hl7BGNc8WIzdgAAbAwnHQ (envelope-from ) for ; Mon, 08 Aug 2022 20:56:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wPJhBGNc8WJHuwAAauVa8A (envelope-from ) for ; Mon, 08 Aug 2022 20:56:35 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8726315D7D for ; Mon, 8 Aug 2022 20:56:34 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B67795F36F; Mon, 8 Aug 2022 18:56:31 +0000 (UTC) X-Greylist: delayed 15958 seconds by postgrey-1.36 at yantan; Mon, 08 Aug 2022 18:56:29 UTC Received: from meesny.iki.fi (meesny.iki.fi [IPv6:2001:67c:2b0:1c1::201]) by mail.notmuchmail.org (Postfix) with ESMTPS id 177F25E545 for ; Mon, 8 Aug 2022 18:56:29 +0000 (UTC) Received: from c53 (gw1.nor.fi [185.218.193.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: too) by meesny.iki.fi (Postfix) with ESMTPSA id 15A4820093; Mon, 8 Aug 2022 21:56:28 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1659984988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YXqP+zv+4GpVix6ZmNJZ9T1g+OdfGlbSFl07G8vZlqY=; b=EEZ0zJQcuEOengG/lf7ME+Eidl9NyXHj1b407P6KtsPKmVu8Llam5VbBSiDNxgvkl3OeE5 xyEia3JRyeCZ5b/dfsufiQ0ofY9rqBDCEcRDQXsRBOsVIAnQh9dKy0MhIlYR+w7mvX+4JN xkE4eosmMjZckQNmXVjr+uaovel8wAU= From: Tomi Ollila To: Mohsin Kaleem , notmuch@notmuchmail.org Subject: Re: [PATCH 6/9] test: Add test cases for new exclude option In-Reply-To: <20220807145733.129867-6-mohkale@kisara.moe> References: <87v8re66mg.fsf@tethera.net> <20220807145733.129867-1-mohkale@kisara.moe> <20220807145733.129867-6-mohkale@kisara.moe> User-Agent: Notmuch/0.36+55~gfb9633d (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1659984988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YXqP+zv+4GpVix6ZmNJZ9T1g+OdfGlbSFl07G8vZlqY=; b=jRWnZ28lGiA9kATZl8pGFd4VTrCT/S55H3kQXorHF7g49/RG19nwpyJjwW/RFhTnf0ET6Z 6DVeKCmhqtebpXllYByZrCIlzj2Jxz3fLuD7NdpVBLMPQQcQPjWT6i4odNRyXU8kZdRyPM Y0owGAhrHX5U4R1+H9bD9Bypnm+Zk3k= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1659984988; a=rsa-sha256; cv=none; b=U2f48+BPtxVpjIGdT/Vx5XUOJAJCUQVX17MNhiNiWR3A4dq2z7xVC3Dk2MlE1LqQWcAder pw1QTxTon1R2mnPFp6/HNR9vhOjbDZDIAzj7ufDobeTGXLr/rP3YfmzCmyHZcbce7kHFZd JBxQxRQ7AMj69j+Tt0dEPmZg8aLM9IA= Message-ID-Hash: RO6NB5OUXSLXAA4XQDABFTCGENEGP4BN X-Message-ID-Hash: RO6NB5OUXSLXAA4XQDABFTCGENEGP4BN X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659984994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=JWgmosXnYH4lbPRZR2CFNhZKe3d5xGo0gU6bqcqaHs0=; b=R9JY4GZM4cR5gA81lT00qiFllEnLyPKTLTqZyaxwuZjcjQ26PhQRnYvxSutLD7Vtc3cb0e /4vOO6swk63cj3iIah0BXquvgH/zl/U15/X4Bcu2pLTzGgCknpZ2FWeLIXommWoY+eMc/K T/wkEewsWByZlDhFVZdh/D+w614ypHcro/cQjPnBOyeIETjygmLBIXWiqUgypQRkTUIpld hn8Tr7fr07uSNm7AxZF3zq16V0f3HV/57wvgu+hFtC10EgdjA+PzDY9YzKXDWkpHjk7ZSP l2u67fIF8vmhcF4vkdOfubVZwbVFssMLQXDQFS4KVWaKinLd47+Vowqa3F9LhQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1659984994; a=rsa-sha256; cv=fail; b=HfN3U9eZF4dPgov5O7XpuO9N3ooo46Sd1r7ks/pAUk5r27qp5Vq5QbxKeP5hK3aEdLLlPP dIGrLTLOJSR+BhWpqOiWpeAFR8a7Hz9CjP9IBBwi8FM8Sa1Rf6HyMYv0OVScEPCROdYCM9 btB3rwgtiqNP400KuPkFOvEHUqGmlwPFgxT822aHhTy0XOUH4+i1cEAu2nuw4U/uFsxTmR 22WQgrB/RXHJ7Cyu0ogObQAyESzL+kY50mLVdF+cUlY6JFjBb+J8bRxrxGxribC8ypPCXz wsVSeuNb41yyNaMXj/9cpFGVNULKXQVFlB3JHJlKVdfa7ptNUDQeK0I/kLhUdQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=meesny header.b=EEZ0zJQc; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 2.76 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=meesny header.b=EEZ0zJQc; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 8726315D7D X-Spam-Score: 2.76 X-Migadu-Scanner: scn1.migadu.com X-TUID: KE2e9ZN40AV0 On Sun, Aug 07 2022, Mohsin Kaleem wrote: > --- > test/T461-emacs-search-exclude.sh | 99 +++++++++++++++++++ > .../notmuch-search-tag-inbox-with-excluded | 25 +++++ > .../notmuch-search-tag-inbox-without-excluded | 21 ++++ > .../notmuch-tree-tag-inbox-with-excluded | 53 ++++++++++ > .../notmuch-tree-tag-inbox-without-excluded | 49 +++++++++ > 5 files changed, 247 insertions(+) > create mode 100755 test/T461-emacs-search-exclude.sh > create mode 100644 test/emacs-exclude.expected-output/notmuch-search-tag-inbox-with-excluded > create mode 100644 test/emacs-exclude.expected-output/notmuch-search-tag-inbox-without-excluded > create mode 100644 test/emacs-exclude.expected-output/notmuch-tree-tag-inbox-with-excluded > create mode 100644 test/emacs-exclude.expected-output/notmuch-tree-tag-inbox-without-excluded > > diff --git a/test/T461-emacs-search-exclude.sh b/test/T461-emacs-search-exclude.sh > new file mode 100755 > index 00000000..bf558847 > --- /dev/null > +++ b/test/T461-emacs-search-exclude.sh > @@ -0,0 +1,99 @@ > +#!/usr/bin/env bash > + > +test_description="exclude options persist between Emacs search and tree modes" > +. $(dirname "$0")/test-lib.sh || exit 1 > +. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1 > + > +EXPECTED=$NOTMUCH_SRCDIR/test/emacs-exclude.expected-output > + > +test_require_emacs > +add_email_corpus > +notmuch config set search.exclude_tags deleted > +notmuch tag +deleted -- 'from:"Stewart Smith"' or 'from:"Chris Wilson"' > + > +# Basic test cases just asserting exclude option is working and consistent. > + > +test_begin_subtest "Search doesn't contain excluded mail by default" > +test_emacs '(notmuch-hello) > + (goto-char (point-min)) > + (re-search-forward "inbox") > + (widget-button-press (1- (point))) > + (notmuch-test-wait) > + (test-output) > + (delete-other-windows)' > +test_expect_equal_file $EXPECTED/notmuch-search-tag-inbox-without-excluded OUTPUT > + > +test_begin_subtest "Toggling exclude in search will show excluded mail" > +test_emacs '(notmuch-hello) > + (goto-char (point-min)) > + (re-search-forward "inbox") > + (widget-button-press (1- (point))) > + (notmuch-test-wait) > + (notmuch-search-toggle-exclude) It looks like tab width was not 8 when these (notmuch-search-toggle-exclude) were added, accidentally indented w/ leading space, not tab ;/ (ditto for all other (notmuch-search-toggle-exclude), rest of the content removed.) > + (notmuch-test-wait) Otherwise, in this large set of changes, I could not see anything alarming, but I did not test (I even don't know how, as I don't have excludes...) Tomi