mingw: do not bother to test funny file names
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 27 Jan 2016 16:20:26 +0000 (17:20 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Jan 2016 21:36:11 +0000 (13:36 -0800)
MSYS2 actually allows to create files or directories whose names contain
tabs, newlines or colors, even if plain Win32 API cannot access them.
As we are using an MSYS2 bash to run the tests, such files or
directories are created successfully, but Git itself has no chance to
work with them because it is a regular Windows program, hence limited by
the Win32 API.

With this change, on Windows otherwise failing tests in
t3300-funny-names.sh, t3600-rm.sh, t3703-add-magic-pathspec.sh,
t3902-quoted.sh, t4016-diff-quote.sh, t4135-apply-weird-filenames.sh,
t9200-git-cvsexportcommit.sh, and t9903-bash-prompt.sh are skipped.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3300-funny-names.sh
t/t3600-rm.sh
t/t3703-add-magic-pathspec.sh
t/t3902-quoted.sh
t/t4016-diff-quote.sh
t/t4135-apply-weird-filenames.sh
t/t9200-git-cvsexportcommit.sh
t/t9903-bash-prompt.sh
index 9a146f133539387a8cbc70fb4f5095eca5cd288e..04de03cad0a7466106a125205742b5feea1b1e2f 100755 (executable)
@@ -13,6 +13,7 @@ tree, index, and tree objects.
 
 HT='   '
 
+test_have_prereq MINGW ||
 echo 2>/dev/null > "Name with an${HT}HT"
 if ! test -f "Name with an${HT}HT"
 then
index 9d90d2c935bcd3d4dc745287a9068395cb2b3d93..11e7526488b052f8c314d8309503bbfdfa49e7bf 100755 (executable)
@@ -14,7 +14,7 @@ test_expect_success \
      git add -- foo bar baz 'space embedded' -q &&
      git commit -m 'add normal files'"
 
-if touch -- 'tab       embedded' 'newline
+if test_have_prereq !MINGW && touch -- 'tab    embedded' 'newline
 embedded' 2>/dev/null
 then
        test_set_prereq FUNNYNAMES
index 5115de7036c38a9464dfdab0e13519a872902991..3ef525a559d91b115a3dbe4a1373c8c51fb1fc98 100755 (executable)
@@ -38,7 +38,7 @@ cat >expected <<EOF
 add 'sub/foo'
 EOF
 
-if mkdir ":" 2>/dev/null
+if test_have_prereq !MINGW && mkdir ":" 2>/dev/null
 then
        test_set_prereq COLON_DIR
 fi
index 892f5678441b3c9065f743d9fe9f071334420831..f528008c363c68f40da3b88a34ae8ec931d0c1ac 100755 (executable)
@@ -12,6 +12,7 @@ GN='純'
 HT='   '
 DQ='"'
 
+test_have_prereq MINGW ||
 echo foo 2>/dev/null > "Name and an${HT}HT"
 if ! test -f "Name and an${HT}HT"
 then
index cd543ecc5429dc175750971f4b593e327ab3fcee..9c48e5c2c99ad1eafc343a2cf6b9eeda54f644d4 100755 (executable)
@@ -13,6 +13,7 @@ P1='pathname  with HT'
 P2='pathname with SP'
 P3='pathname
 with LF'
+test_have_prereq !MINGW &&
 echo 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1" || {
        skip_all='Your filesystem does not allow tabs in filenames'
        test_done
index bf5dc57286493b0b94caf927304e92db11e54f2c..27cb0009fb1ed52b749785c31081b3097fef0022 100755 (executable)
@@ -19,7 +19,8 @@ test_expect_success 'setup' '
 
        test_when_finished "rm -f \"tab embedded.txt\"" &&
        test_when_finished "rm -f '\''\"quoteembedded\".txt'\''" &&
-       if touch -- "tab        embedded.txt" '\''"quoteembedded".txt'\''
+       if test_have_prereq !MINGW &&
+               touch -- "tab   embedded.txt" '\''"quoteembedded".txt'\''
        then
                test_set_prereq FUNNYNAMES
        fi
index 812c9cd462f58f6fd76e3d339e95137aee598801..5cfb9cfc52e715c916f3ebe922e57263d7c4d7da 100755 (executable)
@@ -197,7 +197,7 @@ if p="Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö" &&
 then
 
 # This test contains UTF-8 characters
-test_expect_success \
+test_expect_success !MINGW \
      'File with non-ascii file name' \
      'mkdir -p Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö &&
       echo Foo >Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö/gårdetsågårdet.txt &&
index af82049f82e89c3275c0f1e6c5da9d7f9c7041f5..ffbfa0efb8712f06cb14adc986ae29c4d1c23bf1 100755 (executable)
@@ -67,7 +67,7 @@ repo_with_newline='repo
 with
 newline'
 
-if mkdir "$repo_with_newline" 2>/dev/null
+if test_have_prereq !MINGW && mkdir "$repo_with_newline" 2>/dev/null
 then
        test_set_prereq FUNNYNAMES
 else