mingw: do not bother to test funny file names
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>
Johannes Schindelin committed
Jan 27, 2016 at 17:20 UTC
4539a8982c4cc5180bd9134de8b1f0f855b53a05
8 files changed
+9
-5
t/t3300-funny-names.sh
+1
@@ -13,6 +13,7 @@ tree, index, and tree objects.
13
14
HT=' '
15
16
+test_have_prereq MINGW ||
17
echo 2>/dev/null > "Name with an${HT}HT"
18
if ! test -f "Name with an${HT}HT"
19
then
t/t3600-rm.sh
+1
-1
@@ -14,7 +14,7 @@ test_expect_success \
14
git add -- foo bar baz 'space embedded' -q &&
15
git commit -m 'add normal files'"
16
17
-if touch -- 'tab embedded' 'newline
17
+if test_have_prereq !MINGW && touch -- 'tab embedded' 'newline
18
embedded' 2>/dev/null
19
then
20
test_set_prereq FUNNYNAMES
t/t3703-add-magic-pathspec.sh
+1
-1
@@ -38,7 +38,7 @@ cat >expected <<EOF
38
add 'sub/foo'
39
EOF
40
41
-if mkdir ":" 2>/dev/null
41
+if test_have_prereq !MINGW && mkdir ":" 2>/dev/null
42
then
43
test_set_prereq COLON_DIR
44
fi
t/t3902-quoted.sh
+1
@@ -12,6 +12,7 @@ GN='純'
12
HT=' '
13
DQ='"'
14
15
+test_have_prereq MINGW ||
16
echo foo 2>/dev/null > "Name and an${HT}HT"
17
if ! test -f "Name and an${HT}HT"
18
then
t/t4016-diff-quote.sh
+1
@@ -13,6 +13,7 @@ P1='pathname with HT'
13
P2='pathname with SP'
14
P3='pathname
15
with LF'
16
+test_have_prereq !MINGW &&
17
echo 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1" || {
18
skip_all='Your filesystem does not allow tabs in filenames'
19
test_done
t/t4135-apply-weird-filenames.sh
+2
-1
@@ -19,7 +19,8 @@ test_expect_success 'setup' '
19
20
test_when_finished "rm -f \"tab embedded.txt\"" &&
21
test_when_finished "rm -f '\''\"quoteembedded\".txt'\''" &&
22
- if touch -- "tab embedded.txt" '\''"quoteembedded".txt'\''
22
+ if test_have_prereq !MINGW &&
23
+ touch -- "tab embedded.txt" '\''"quoteembedded".txt'\''
24
then
25
test_set_prereq FUNNYNAMES
26
fi
t/t9200-git-cvsexportcommit.sh
+1
-1
@@ -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/å/ä/ö" &&
197
then
198
199
# This test contains UTF-8 characters
200
-test_expect_success \
200
+test_expect_success !MINGW \
201
'File with non-ascii file name' \
202
'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/å/ä/ö &&
203
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 &&
t/t9903-bash-prompt.sh
+1
-1
@@ -67,7 +67,7 @@ repo_with_newline='repo
67
with
68
newline'
69
70
-if mkdir "$repo_with_newline" 2>/dev/null
70
+if test_have_prereq !MINGW && mkdir "$repo_with_newline" 2>/dev/null
71
then
72
test_set_prereq FUNNYNAMES
73
else