Re: [PATCH 1/2] mingw: verify that paths are not mistaken for remote nicknames
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- May 29, 2017, 21:02 UTC
- Message-ID
- <34029b29-9f65-78c0-c2ed-649b179a79ac@kdbg.org>
- In-Reply-To
- <CACBZZX5BgVbUFEwQjHqJVfHFUitTJRaCx-Lg+j7q54uErEpqcg@mail.gmail.com>
Am 29.05.2017 um 22:40 schrieb Ævar Arnfjörð Bjarmason:
Show 25 quoted lines
> On Mon, May 29, 2017 at 10:25 PM, Johannes Sixt <j6t@kdbg.org> wrote: >> diff --git a/t/t5580-clone-push-unc.sh b/t/t5580-clone-push-unc.sh >> index b195f71ea9..fd719a209e 100755 >> --- a/t/t5580-clone-push-unc.sh >> +++ b/t/t5580-clone-push-unc.sh >> @@ -1,13 +1,19 @@ >> #!/bin/sh >> >> -test_description='various UNC path tests (Windows-only)' >> +test_description='various Windows-only path tests' >> . ./test-lib.sh >> >> if ! test_have_prereq MINGW; then >> - skip_all='skipping UNC path tests, requires Windows' >> + skip_all='skipping Windows-only path tests' >> test_done >> fi >> >> +test_expect_failure 'remote nick cannot contain backslashes' ' >> + BACKSLASHED="$(pwd | tr / \\\\)" && >> + git ls-remote "$BACKSLASHED" >out 2>err && >> + ! grep "unable to access" err >> +' > > Doesn't this need test_i18ngrep?:
Good catch! It would be this one in warn_on_inaccessible:
> wrapper.c:581: warning_errno(_("unable to access '%s'"), path);But actually, I'm more worried about the unholy mix of one-test-first-then-skip_all-later that occurs in this test script (I do not mean the skip_all that is visible in the context, there are others later). I think there was some buzz recently that prove only understands a summary line that reads "1..0", but here we would see "1..1". What to do? Reorganize the test script? Dscho, any ideas?
-- Hannes