unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Ali Alnubani <alialnu@nvidia.com>
Cc: meta@public-inbox.org
Subject: [PATCH] t/config: test --get-urlmatch for git <2.26
Date: Sat, 26 Dec 2020 12:30:35 +0000	[thread overview]
Message-ID: <20201226123035.GB24392@dcvr> (raw)
In-Reply-To: <DM6PR12MB49106F8E3BD697B63B943A22DADB0@DM6PR12MB4910.namprd12.prod.outlook.com>

Ali Alnubani <alialnu@nvidia.com> wrote:
> t/config.t ................... 1/?
> #   Failed test 'urlmatch hit'
> #   at t/config.t line 249.
> #          got: undef
> #     expected: '9'
> # Looks like you failed 1 test of 95.

Just fixing the test, for now; I guess -watch documentation
could use some updates or the code updated to not depend on
git for URL matching at all (it's not in libgit2, either,
but wildcard => Perl regexp translation isn't too bad, and
we'll be needing it elsewhere, I think)

----------8<---------
Subject: [PATCH] t/config: test --get-urlmatch for git <2.26

While git 1.8.5 learned --get-urlmatch, git did not learn to
match URLs against wildcards until 2.26.  So only depend on
1.8.5 for this test since 2.26 is too new.

Reported-by: Ali Alnubani <alialnu@nvidia.com>
Link: https://public-inbox.org/meta/DM6PR12MB49106F8E3BD697B63B943A22DADB0@DM6PR12MB4910.namprd12.prod.outlook.com/
---
 t/config.t | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/config.t b/t/config.t
index 99a7fef4..7fb44acc 100644
--- a/t/config.t
+++ b/t/config.t
@@ -234,12 +234,13 @@ EOF
 }
 
 SKIP: {
+	# XXX wildcard match requires git 2.26+
 	require_git('1.8.5', 2) or
 		skip 'git 1.8.5+ required for --url-match', 2;
 	my $f = "$tmpdir/urlmatch";
 	open my $fh, '>', $f or BAIL_OUT $!;
 	print $fh <<EOF or BAIL_OUT $!;
-[imap "imap://*.example.com"]
+[imap "imap://mail.example.com"]
 	pollInterval = 9
 EOF
 	close $fh or BAIL_OUT;

  parent reply	other threads:[~2020-12-26 12:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-26 11:27 [Debian 9][Perl 5.24] uninitialized value errors in Encode/MIME/Header.pm Ali Alnubani
2020-12-26 12:25 ` [PATCH] eml: fix undefined vars on <Perl 5.28 Eric Wong
2020-12-26 14:10   ` Ali Alnubani
2020-12-26 20:35     ` stable 1.6.1 release? [was: [PATCH] eml: fix undefined vars on <Perl 5.28] Eric Wong
2020-12-31  0:06       ` Eric Wong
2020-12-26 12:30 ` Eric Wong [this message]
2020-12-26 14:12   ` [PATCH] t/config: test --get-urlmatch for git <2.26 Ali Alnubani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201226123035.GB24392@dcvr \
    --to=e@80x24.org \
    --cc=alialnu@nvidia.com \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).