From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uAaiNZQRbWCFHwEAgWs5BA (envelope-from ) for ; Wed, 07 Apr 2021 03:57:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kPiDL5QRbWAOFAAA1q6Kng (envelope-from ) for ; Wed, 07 Apr 2021 01:57:40 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 3B498A0E2 for ; Wed, 7 Apr 2021 03:57:40 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 2281C290A9; Tue, 6 Apr 2021 21:56:34 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 06C4529056 for ; Tue, 6 Apr 2021 21:55:57 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id DBDB55FA96; Tue, 6 Apr 2021 21:55:56 -0400 (EDT) Received: (nullmailer pid 2964232 invoked by uid 1000); Wed, 07 Apr 2021 01:55:35 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 13/28] test/setup: check file output instead of notmuch config list Date: Tue, 6 Apr 2021 22:55:15 -0300 Message-Id: <20210407015530.2964017-14-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210407015530.2964017-1-david@tethera.net> References: <20210407015530.2964017-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: S6PDF2GUUCTD5PFZ3YA25FRRS2RIJQL6 X-Message-ID-Hash: S6PDF2GUUCTD5PFZ3YA25FRRS2RIJQL6 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=1617760660; 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=N4tKWZdUjc591aNvULrlK0RpUQ5Uds6sDhVj6EHIRbE=; b=Q0k8FB5ZjPdF50Sc3lKmyE4zBgwSnkEyiy3Y/C0I+q04IRcX2F81mARm0tydfysLYNDYpV NesarBvoTUcG03IfzeILOz6LJoFkSOUSEMEWWLdi1fQ7r+7sPAxkfGNIONN9gd9M+IL5Fd MH/Nvxo8s4/4jQZw8lvQPWn5xbfePLw4uC8TzQE7UGZya4sHDpY+Wt6xGjmncqSl19FRit O3a7weAfxMRns+jp38oviAYPZxeCx49vwOzh98yFry4rrWwitb5Cn3C3RT/b8Gi0/p77bo qzaXRhM6mqMd7mn2YaBuwz9hpUfNyq0nZgkH/H+vlVgXM2ioXrS9A9o90+xCVw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617760660; a=rsa-sha256; cv=none; b=s++k+Q9wvXc532FBksj9ZNp0x/hruSKbblpNSXiJ8t3HWn1XL5WVPJusk4ThAkEUX+Lr38 2bfhLekrgQbVAf4yfeDbcN6V2/E5WeEQnS3fIZUyH0AkhoZ9N38rs6SOU7TY40kfHh9laG Mle/DWk3s5xsn9//gwPM49F+RA0x1CfcgFv4wKL7a+TYQ7GBvyQWyD5g424g2XZpU7cX/k +cQvIhxrt5y2gTsDxdzPeaOFm76dGV5AO68AfygioLHEs9zcoxZ3OPu//Gvm78zHBdELpu 8Fm20abFK+OPIa+0R10Y5BZLF4mwrIw9estIS1FsN2XFKEcvUybSTRYRzFUFaw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.99 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 3B498A0E2 X-Spam-Score: -0.99 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8OFQ5X3+h04U 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.2