Tests (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 has no chance to work with
them because it is a regular Windows program, hence limited by the Win32
API.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2015-02-18 11:55:48 +00:00
parent ffa5cb5f6e
commit b48bdcd876
7 changed files with 9 additions and 4 deletions

View File

@@ -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

View File

@@ -14,7 +14,8 @@ 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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