From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UK6lLrraQGB1bgAA0tVLHw (envelope-from ) for ; Thu, 04 Mar 2021 13:03:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KH1sKrraQGDFRwAAB5/wlQ (envelope-from ) for ; Thu, 04 Mar 2021 13:03:54 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 1623F221D5 for ; Thu, 4 Mar 2021 14:03:50 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1220127C29; Thu, 4 Mar 2021 08:02:25 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id B412726C3E for ; Thu, 4 Mar 2021 08:02:01 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id AB2965FA96; Thu, 4 Mar 2021 08:02:01 -0500 (EST) Received: (nullmailer pid 4047188 invoked by uid 1000); Thu, 04 Mar 2021 13:01:45 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 12/27] test/setup: check file output instead of notmuch config list Date: Thu, 4 Mar 2021 09:01:24 -0400 Message-Id: <20210304130139.4046183-13-david@tethera.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210304130139.4046183-1-david@tethera.net> References: <20210304130139.4046183-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: V44BKUDEDFGCK6C7KSKEY2KKXFAIYRKC X-Message-ID-Hash: V44BKUDEDFGCK6C7KSKEY2KKXFAIYRKC X-MailFrom: bremner@tethera.net 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614863030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc: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-unsubscribe:list-subscribe:list-post; bh=Td/f8mNRRcnJhbQJk+EyuHVhUCY6hXAjB6gIlnx9RRA=; b=ZPMsk8xATBUZ3dAC7ZoVRCKHUFoxdO8Dy28nX24XXgt/nMCgBUS9Hk10o/ipDjR752+2CI Y5OzJkUZ4ga99U+gXLaTYerAmVbPj6MfRGD8Q4sixYJNmLbpunV9qoWjBLlmuraUPh5H+Q AD9NKUWP1WZaANshMG4UkrEjIdXBsuIjTGnvTxWcOdfdAUpJeudv7SGqcUTxC7Cv+UMVSw IPa6MVUjcyYcHtFv5nXMj4zeeJQkBAo36BFInlIIcWHLBPnk+KpTkp0Nb7LTBgOAS9oUi1 ems9XhhUY+KkftGhWkiL+vqosFwGMVC6a/VwNK5hVsBMJAnJMELHIVZx+fxFyg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614863030; a=rsa-sha256; cv=none; b=UGHiXfARTsaPfFKy0fBPMG5IG7GKfxG/xoeOnK9RUMY5CEFhJvSIF0/5GSgU+En6fUkxz/ Nwm8cbP+Iyogo7wuYkq6qZYOtHW4QR+ghqlmqVwcBu04Xow79bWByivCd38zwwfGgqXGhy BxiroNENN00+1XZWpTPKhlBunXQc/KZAIWpSl91eIBJr9hLkqUEpbD+i6K6JenRtSu/FqD MEvmLhF2iK2yegGTAhhdS5CFM6tNLo1Aq4CyI9wStYODVncAEiZmUx83gMzV4zdyhwCesu R3wqrLWIvd9bDi/Itd9LXVK/f5AHcySbrDDfT6h933Qbe1ZXXajCUCuIus0RoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.80 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 1623F221D5 X-Spam-Score: -0.80 X-Migadu-Scanner: scn1.migadu.com X-TUID: xcGc2N7rC5yJ This allows verification of comments added to new / updated config file. --- test/T040-setup.sh | 17 +--- .../config-with-comments | 88 +++++++++++++++++++ 2 files changed, 91 insertions(+), 14 deletions(-) create mode 100644 test/setup.expected-output/config-with-comments diff --git a/test/T040-setup.sh b/test/T040-setup.sh index 5eb281d7..daeca3e4 100755 --- a/test/T040-setup.sh +++ b/test/T040-setup.sh @@ -10,7 +10,7 @@ Error: cannot load config file. Try running 'notmuch setup' to create a configuration." test_begin_subtest "Create a new config interactively" -notmuch --config=new-notmuch-config > /dev/null < log.${test_count} <&1 | notmuch_dir_sanitize > OUTPUT diff --git a/test/setup.expected-output/config-with-comments b/test/setup.expected-output/config-with-comments new file mode 100644 index 00000000..d9f796f2 --- /dev/null +++ b/test/setup.expected-output/config-with-comments @@ -0,0 +1,88 @@ +# .notmuch-config - Configuration file for the notmuch mail system +# +# For more information about notmuch, see https://notmuchmail.org + +# Database configuration +# +# The only value supported here is 'path' which should be the top-level +# directory where your mail currently exists and to where mail will be +# delivered in the future. Files should be individual email messages. +# Notmuch will store its database within a sub-directory of the path +# configured here named ".notmuch". +# +[database] +path=/path/to/maildir + +# User configuration +# +# Here is where you can let notmuch know how you would like to be +# addressed. Valid settings are +# +# name Your full name. +# primary_email Your primary email address. +# other_email A list (separated by ';') of other email addresses +# at which you receive email. +# +# Notmuch will use the various email addresses configured here when +# formatting replies. It will avoid including your own addresses in the +# recipient list of replies, and will set the From address based on the +# address to which the original email was addressed. +# +[user] +name=Test Suite +primary_email=test.suite@example.com +other_email=another.suite@example.com; + +# Configuration for "notmuch new" +# +# The following options are supported here: +# +# tags A list (separated by ';') of the tags that will be +# added to all messages incorporated by "notmuch new". +# +# ignore A list (separated by ';') of file and directory names +# that will not be searched for messages by "notmuch new". +# +# NOTE: *Every* file/directory that goes by one of those +# names will be ignored, independent of its depth/location +# in the mail store. +# +[new] +tags=foo;bar; +ignore= + +# Search configuration +# +# The following option is supported here: +# +# exclude_tags +# A ;-separated list of tags that will be excluded from +# search results by default. Using an excluded tag in a +# query will override that exclusion. +# +[search] +exclude_tags=baz; + +# Maildir compatibility configuration +# +# The following option is supported here: +# +# synchronize_flags Valid values are true and false. +# +# If true, then the following maildir flags (in message filenames) +# will be synchronized with the corresponding notmuch tags: +# +# Flag Tag +# ---- ------- +# D draft +# F flagged +# P passed +# R replied +# S unread (added when 'S' flag is not present) +# +# The "notmuch new" command will notice flag changes in filenames +# and update tags, while the "notmuch tag" and "notmuch restore" +# commands will notice tag changes and update flags in filenames +# +[maildir] +synchronize_flags=true -- 2.30.1