Re: [PATCH 1/2] mingw: verify that paths are not mistaken for remote nicknames
From: Junio C Hamano <hidden>
Date: 2017-05-30 04:47:12
Johannes Sixt [off-list ref] writes:
quoted
Doesn't this need test_i18ngrep?:Good catch! It would be this one in warn_on_inaccessible:quoted
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?
For now I've queued this on top of 1/2, so that suggestions are not lost, and then tweaked 2/2 (as context for the patch to the test changes). Either an ack or a reroll is appreciated (I do not think we'd terribly mind if this test were added to another script, or if this test were skipped when UNC path cannot be determined even though it does not need that prereq. Also UNC_PATH can become prereq that is tested by individual test in this script and the new test can be added without requiring that prereq). Thanks. t/t5580-clone-push-unc.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t5580-clone-push-unc.sh b/t/t5580-clone-push-unc.sh
index fd719a209e..944730cddc 100755
--- a/t/t5580-clone-push-unc.sh
+++ b/t/t5580-clone-push-unc.sh@@ -8,12 +8,6 @@ if ! test_have_prereq MINGW; then 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 -' - UNCPATH="$(pwd)" case "$UNCPATH" in [A-Z]:*)
@@ -51,4 +45,10 @@ test_expect_success push ' test "$rev" = "$(git rev-parse --verify refs/heads/to-push)" ' +test_expect_failure 'remote nick cannot contain backslashes' ' + BACKSLASHED="$(pwd | tr / \\\\)" && + git ls-remote "$BACKSLASHED" >out 2>err && + test_i18ngrep ! "unable to access" err +' + test_done
--
2.13.0-493-g9105ebc082