mirror of
https://github.com/git/git.git
synced 2026-02-04 15:04:45 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user