Re: [PATCH 1/2] mingw: verify that paths are not mistaken for remote nicknames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 29.05.2017 um 22:40 schrieb Ævar Arnfjörð Bjarmason:
On Mon, May 29, 2017 at 10:25 PM, Johannes Sixt <j6t@xxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]