From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D14D11F45A; Mon, 20 Apr 2020 00:45:16 +0000 (UTC) Date: Mon, 20 Apr 2020 00:45:15 +0000 From: Eric Wong To: Kyle Meyer Cc: meta@public-inbox.org Subject: Re: [PATCH v2] watchmaildir: support multiple watchheader values Message-ID: <20200420004515.GA67768@dcvr> References: <20200412215933.GA63705@dcvr> <20200420001332.14769-1-kyle@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200420001332.14769-1-kyle@kyleam.com> List-Id: Kyle Meyer wrote: Thanks. Most everything looks good, some minor issues.. > +++ b/t/watch_muliple_headers.t speling :> > +my $num = $ibx->mm->num_for('to@a.com'); > +ok(defined $num, 'Matched for address in To:'); > +my $num = $ibx->mm->num_for('cc@a.com'); That `$num' shadows/masks Will squash the following in before pushing: diff --git a/MANIFEST b/MANIFEST index bfcf26b4..b06aa679 100644 --- a/MANIFEST +++ b/MANIFEST @@ -307,7 +307,7 @@ t/view.t t/watch_filter_rubylang.t t/watch_maildir.t t/watch_maildir_v2.t -t/watch_muliple_headers.t +t/watch_multiple_headers.t t/www_altid.t t/www_listing.t t/www_static.t diff --git a/t/watch_muliple_headers.t b/t/watch_multiple_headers.t similarity index 97% rename from t/watch_muliple_headers.t rename to t/watch_multiple_headers.t index 8ea4b306..3a39eba9 100644 --- a/t/watch_muliple_headers.t +++ b/t/watch_multiple_headers.t @@ -68,7 +68,7 @@ ok($ibx, 'found inbox by name'); my $num = $ibx->mm->num_for('to@a.com'); ok(defined $num, 'Matched for address in To:'); -my $num = $ibx->mm->num_for('cc@a.com'); +$num = $ibx->mm->num_for('cc@a.com'); ok(defined $num, 'Matched for address in Cc:'); $num = $ibx->mm->num_for('none@a.com'); is($num, undef, 'No match without address in To: or Cc:'); On a side note, some of my private scripts use neither -w, warnings, nor strict. It's quite liberating, especially when combined with `do' instead of `require' :>