From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IJ7DAPnRUV/GHwAA0tVLHw (envelope-from ) for ; Fri, 04 Sep 2020 05:34:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8IQ0OPjRUV8gHAAAB5/wlQ (envelope-from ) for ; Fri, 04 Sep 2020 05:34:48 +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) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4EB0C9402A2 for ; Fri, 4 Sep 2020 05:34:47 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C52DA29968; Fri, 4 Sep 2020 01:34:36 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id D1B5B29308 for ; Fri, 4 Sep 2020 01:34:33 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 05ED11B001F0; Fri, 4 Sep 2020 08:34:30 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1599197670; 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: in-reply-to:in-reply-to:references:references; bh=EKSrM5BwbRCt70SdJ9Ut+ps8ysWcMw8dw2Gxm8ldEo0=; b=hLkEkIpSw+9JrRMcLoYOi+QQfLwQDTkeaSEmzWTR2iLBp3Cb5ObevAdXvcdaYqUgSNcI2p tqBZ+PAV5qsXz0nznX5cqyK2oeY6NuOaFJctuOboWuvgKFkTmnya/Yc/Rtn4xiO8gEK9AJ afjXMRP/h0WOgFw/XKrK2Q8pupwd9th0IxFoBNeoK0PH2A1AmO4fDqGCHBHw/5nuwFGAn6 FThcEPEb1TBWDv0BZjNavsf4+I0qSkv/COdpjcF4PfcLWWgpf+M22ctXeYrmMIJarh8XS4 a2XeSDwYuEYt5+x83Mg/7QNqk+tP1ctiu0CQfaZXxRzC1N5fXv8Ou9JslbH3sw== From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Cc: David Bremner Subject: Re: [PATCH] test: fix syntax errors in erroring calls to notmuch insert In-Reply-To: <20200904011057.3567667-1-david@tethera.net> References: <20200904011057.3567667-1-david@tethera.net> User-Agent: Notmuch/0.31~rc0+3~ge349e17 (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=lahtoruutu; t=1599197670; 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: in-reply-to:in-reply-to:references:references; bh=EKSrM5BwbRCt70SdJ9Ut+ps8ysWcMw8dw2Gxm8ldEo0=; b=mIfoBEiLhVgK+2ysE9dc8VkhjLc4xWY/pyzI2FVA4Pb3wgyQNGxTpvQU7O6zDWaibtc/mo cXoHOHKe06hI26FpTF/yX3ZFj2Mj+xOU9xGWN6w26Bu0hYzrkpSi3ZFG8Wg05RxvANRkLw MkT/clwwu7DcfZA+2wWQpYm8GA+ajpNqhXF9xXK6uR0XC52W2T8q/o3CxwxLDC3KhzQPwM 7HaTz3XS1AUtZFKzg6HXvLQwk/fQDOG9yqKI1U0NctgL8dmeDrIikh9a4PIfAgNq3ShWzx VQUV9+TBmiPz5K+/f0ZD1sl562nTPIuHCekgyF8vvbA2vJjb/tFI78vSzSgT2g== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1599197670; a=rsa-sha256; cv=none; b=SFjVlK/8t0PF5LHRO2OHwb0F87sEhRNV/EnvxUgaCmfPRu1Av9ZioHcDKLfxtQyvUF3yhQ coVj6zUkMM4dMEVJiNbqsEMVghJsrKGvkt5GTsD5utc2euxZmJYRMSgXmL1/icBJYdx6BM PLlVRZO4wRbVqLRRgypzrEB40aFwS6OlWH55SABWMBOdjcc1m8FEYk0cw6RxSItVjl+nGa +oyr2jytpLfUqK4yDGHWIbHrHbg9LWu+75bfUL0wtrMtibp8c7qijIMNTNnlcF9dLvGm9U QeVVfcmjxx4v2/sox4S2vq5IBOj7Rr+e/UDUa4lzEYTBr/PXDK4YgdCVzmN3Nw== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi Message-ID-Hash: CP2Y6VFM5DNB6F5J6YZWHRKF5ZEU5ZH5 X-Message-ID-Hash: CP2Y6VFM5DNB6F5J6YZWHRKF5ZEU5ZH5 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; 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=iki.fi header.s=lahtoruutu header.b=hLkEkIpS; 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-Spam-Score: 3.53 X-TUID: 46rO5RieQLGa On Thu, Sep 03 2020, David Bremner wrote: > notmuch insert does not currently support passing a filename for the > input, so all of these tests have an extra error in addition to the > one being tested for. > > Currently this does not make a difference because the error being > tested for is caught before the error of an extra command line > argument. In the future it might make a difference, and in any case it > is confusing. LGTM. Tomi > --- > test/T070-insert.sh | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/test/T070-insert.sh b/test/T070-insert.sh > index c8161e1e..1c7ca846 100755 > --- a/test/T070-insert.sh > +++ b/test/T070-insert.sh > @@ -222,24 +222,24 @@ test_expect_equal "$output" "2" > > test_begin_subtest "Insert message, create invalid subfolder" > gen_insert_msg > -test_expect_code 1 "notmuch insert --folder=../G --create-folder $gen_msg_filename" > +test_expect_code 1 "notmuch insert --folder=../G --create-folder < $gen_msg_filename" > > OLDCONFIG=$(notmuch config get new.tags) > > test_begin_subtest "Empty tags in new.tags are forbidden" > notmuch config set new.tags "foo;;bar" > gen_insert_msg > -output=$(notmuch insert $gen_msg_filename 2>&1) > +output=$(notmuch insert < $gen_msg_filename 2>&1) > test_expect_equal "$output" "Error: tag '' in new.tags: empty tag forbidden" > > test_begin_subtest "Tags starting with '-' in new.tags are forbidden" > notmuch config set new.tags "-foo;bar" > gen_insert_msg > -output=$(notmuch insert $gen_msg_filename 2>&1) > +output=$(notmuch insert < $gen_msg_filename 2>&1) > test_expect_equal "$output" "Error: tag '-foo' in new.tags: tag starting with '-' forbidden" > > test_begin_subtest "Invalid tags set exit code" > -test_expect_code 1 "notmuch insert $gen_msg_filename 2>&1" > +test_expect_code 1 "notmuch insert < $gen_msg_filename 2>&1" > > notmuch config set new.tags $OLDCONFIG > > -- > 2.28.0