All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH v2 19/19] mingw: do not bother to test funny file names
Date: Tue, 26 Jan 2016 15:35:43 +0100 (CET)	[thread overview]
Message-ID: <47914e4ceb3ea51636dd5ae308679c9c92fcbef0.1453818790.git.johannes.schindelin@gmx.de> (raw)
In-Reply-To: <cover.1453818789.git.johannes.schindelin@gmx.de>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=X-UNKNOWN, Size: 4398 bytes --]

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>
---
 t/t3300-funny-names.sh           | 1 +
 t/t3600-rm.sh                    | 3 ++-
 t/t3703-add-magic-pathspec.sh    | 2 +-
 t/t3902-quoted.sh                | 1 +
 t/t4016-diff-quote.sh            | 1 +
 t/t4135-apply-weird-filenames.sh | 3 ++-
 t/t9200-git-cvsexportcommit.sh   | 2 +-
 t/t9903-bash-prompt.sh           | 2 +-
 8 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh
index 9a146f1..04de03c 100755
--- a/t/t3300-funny-names.sh
+++ b/t/t3300-funny-names.sh
@@ -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
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 2e47a2b..5232ee9 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -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
diff --git a/t/t3703-add-magic-pathspec.sh b/t/t3703-add-magic-pathspec.sh
index 5115de7..aaff784 100755
--- a/t/t3703-add-magic-pathspec.sh
+++ b/t/t3703-add-magic-pathspec.sh
@@ -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
diff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh
index 892f567..f528008 100755
--- a/t/t3902-quoted.sh
+++ b/t/t3902-quoted.sh
@@ -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
diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
index cd543ec..9c48e5c 100755
--- a/t/t4016-diff-quote.sh
+++ b/t/t4016-diff-quote.sh
@@ -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
diff --git a/t/t4135-apply-weird-filenames.sh b/t/t4135-apply-weird-filenames.sh
index bf5dc57..6d6b96d 100755
--- a/t/t4135-apply-weird-filenames.sh
+++ b/t/t4135-apply-weird-filenames.sh
@@ -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
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index 812c9cd..5cfb9cf 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -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 &&
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index af82049..2ee6564 100755
--- a/t/t9903-bash-prompt.sh
+++ b/t/t9903-bash-prompt.sh
@@ -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
-- 
2.7.0.windows.1.7.g55a05c8

  parent reply	other threads:[~2016-01-26 14:35 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-24 15:43 [PATCH 00/19] Let Git's tests pass on Windows Johannes Schindelin
2016-01-24 15:43 ` [PATCH 01/19] mingw: let's use gettext with MSYS2 Johannes Schindelin
2016-01-25  1:42   ` Junio C Hamano
2016-01-25 16:16     ` Johannes Schindelin
2016-01-25 18:53       ` Junio C Hamano
2016-01-24 15:43 ` [PATCH 02/19] mingw: do not trust MSYS2's MinGW gettext.sh Johannes Schindelin
2016-01-24 15:43 ` [PATCH 03/19] Git.pm: stop assuming that absolute paths start with a slash Johannes Schindelin
2016-01-24 15:43 ` [PATCH 04/19] mingw: factor out Windows specific environment setup Johannes Schindelin
2016-01-24 15:43 ` [PATCH 05/19] mingw: prepare the TMPDIR environment variable for shell scripts Johannes Schindelin
2016-01-25  2:11   ` Eric Sunshine
2016-01-26  8:38     ` Johannes Schindelin
2016-01-24 15:44 ` [PATCH 06/19] mingw: try to delete target directory before renaming Johannes Schindelin
2016-01-24 17:42   ` Philip Oakley
2016-01-25  6:59     ` Johannes Schindelin
2016-01-25 18:55       ` Junio C Hamano
2016-01-26  8:14         ` Johannes Schindelin
2016-01-24 15:44 ` [PATCH 07/19] mingw: let lstat() fail with errno == ENOTDIR when appropriate Johannes Schindelin
2016-01-24 15:44 ` [PATCH 08/19] mingw: fix t5601-clone.sh Johannes Schindelin
2016-01-24 15:44 ` [PATCH 09/19] mingw: accomodate t0060-path-utils for MSYS2 Johannes Schindelin
2016-01-24 19:51   ` Johannes Sixt
2016-01-25 15:39     ` Johannes Schindelin
2016-01-24 15:44 ` [PATCH 10/19] mingw: disable mkfifo-based tests Johannes Schindelin
2016-01-24 15:44 ` [PATCH 11/19] tests: turn off git-daemon tests if FIFOs are not available Johannes Schindelin
2016-01-24 15:45 ` [PATCH 12/19] mingw: do not use symlinks with SVN in t9100 Johannes Schindelin
2016-01-25  1:51   ` Junio C Hamano
2016-01-25 16:53     ` Johannes Schindelin
2016-01-24 15:45 ` [PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508 Johannes Schindelin
2016-01-25  2:03   ` Junio C Hamano
2016-01-25  6:22     ` Eric Sunshine
2016-01-25 18:50       ` Junio C Hamano
2016-01-26  6:53         ` Johannes Schindelin
2016-01-25 16:30     ` Johannes Schindelin
2016-01-25 17:04       ` Johannes Schindelin
2016-01-24 15:45 ` [PATCH 14/19] mingw: fix t9700's assumption about directory separators Johannes Schindelin
2016-01-24 15:45 ` [PATCH 15/19] mingw: work around pwd issues in the tests Johannes Schindelin
2016-01-24 15:45 ` [PATCH 16/19] mingw: avoid absolute path in t0008 Johannes Schindelin
2016-01-25  2:11   ` Junio C Hamano
2016-01-25 16:48     ` Johannes Schindelin
2016-01-25 19:31       ` Ray Donnelly
2016-01-25 22:20       ` Junio C Hamano
2016-01-26  8:00         ` Johannes Schindelin
2016-01-24 15:45 ` [PATCH 17/19] mingw: fix git-svn tests that expect chmod to work Johannes Schindelin
2016-01-25  2:14   ` Junio C Hamano
2016-01-26  6:31     ` Johannes Schindelin
2016-01-26 17:42       ` Junio C Hamano
2016-01-24 15:45 ` [PATCH 18/19] mingw: skip a couple of git-svn tests that cannot pass on Windows Johannes Schindelin
2016-01-25  2:16   ` Junio C Hamano
2016-01-26  6:45     ` Johannes Schindelin
2016-01-24 15:45 ` [PATCH 19/19] mingw: do not bother to test funny file names Johannes Schindelin
2016-01-25  1:34 ` [PATCH 00/19] Let Git's tests pass on Windows Junio C Hamano
2016-01-25 15:45   ` Johannes Schindelin
2016-01-26 14:34 ` [PATCH v2 " Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 01/19] mingw: let's use gettext with MSYS2 Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 02/19] mingw: do not trust MSYS2's MinGW gettext.sh Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 03/19] Git.pm: stop assuming that absolute paths start with a slash Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 04/19] mingw: factor out Windows specific environment setup Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 05/19] mingw: prepare the TMPDIR environment variable for shell scripts Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 06/19] mingw: try to delete target directory before renaming Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 07/19] mingw: let lstat() fail with errno == ENOTDIR when appropriate Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 08/19] mingw: fix t5601-clone.sh Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 09/19] mingw: accomodate t0060-path-utils for MSYS2 Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 10/19] mingw: disable mkfifo-based tests Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 11/19] tests: turn off git-daemon tests if FIFOs are not available Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 12/19] mingw: skip test in t1508 that fails due to path conversion Johannes Schindelin
2016-01-26 22:02     ` Junio C Hamano
2016-01-27  8:50       ` Johannes Schindelin
2016-01-27 20:23         ` Junio C Hamano
2016-01-28  7:58           ` Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 13/19] mingw: fix t9700's assumption about directory separators Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 14/19] mingw: work around pwd issues in the tests Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 15/19] Avoid absolute path in t0008 Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 16/19] mingw: mark t9100's test cases with appropriate prereqs Johannes Schindelin
2016-01-26 21:50     ` Junio C Hamano
2016-01-27 16:02       ` Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 17/19] mingw: avoid illegal filename in t9118 Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 18/19] mingw: handle the missing POSIXPERM prereq in t9124 Johannes Schindelin
2016-01-26 22:05     ` Junio C Hamano
2016-01-27  9:20       ` Johannes Schindelin
2016-01-26 14:35   ` Johannes Schindelin [this message]
2016-01-26 20:03     ` [PATCH v2 19/19] mingw: do not bother to test funny file names Eric Sunshine
2016-01-26 20:24       ` Junio C Hamano
2016-01-27  8:33       ` Johannes Schindelin
2016-01-26 22:12   ` [PATCH v2 00/19] Let Git's tests pass on Windows Junio C Hamano
2016-01-27  8:38     ` Johannes Schindelin
2016-01-27 20:24       ` Junio C Hamano
2016-01-27 16:19   ` [PATCH v3 00/20] " Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 01/20] mingw: let's use gettext with MSYS2 Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 02/20] mingw: do not trust MSYS2's MinGW gettext.sh Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 03/20] Git.pm: stop assuming that absolute paths start with a slash Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 04/20] mingw: factor out Windows specific environment setup Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 05/20] mingw: prepare the TMPDIR environment variable for shell scripts Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 06/20] mingw: try to delete target directory before renaming Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 07/20] mingw: let lstat() fail with errno == ENOTDIR when appropriate Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 08/20] mingw: fix t5601-clone.sh Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 09/20] mingw: accomodate t0060-path-utils for MSYS2 Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 10/20] mingw: disable mkfifo-based tests Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 11/20] tests: turn off git-daemon tests if FIFOs are not available Johannes Schindelin
2016-01-28  8:21       ` Eric Sunshine
2016-01-28  8:40         ` Johannes Schindelin
2016-01-28 21:35           ` Junio C Hamano
2016-01-27 16:19     ` [PATCH v3 12/20] mingw: skip test in t1508 that fails due to path conversion Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 13/20] mingw: fix t9700's assumption about directory separators Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 14/20] mingw: work around pwd issues in the tests Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 15/20] Avoid absolute path in t0008 Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 16/20] mingw: mark t9100's test cases with appropriate prereqs Johannes Schindelin
2016-01-27 16:33       ` Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 17/20] mingw: avoid illegal filename in t9118 Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 18/20] mingw: handle the missing POSIXPERM prereq in t9124 Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 19/20] mingw: skip a test in t9130 that cannot pass on Windows Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 20/20] mingw: do not bother to test funny file names Johannes Schindelin
2016-01-28  8:42     ` [PATCH v3 00/20] Let Git's tests pass on Windows Eric Sunshine
2016-01-28  8:57       ` Johannes Schindelin
2016-01-28 21:37         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47914e4ceb3ea51636dd5ae308679c9c92fcbef0.1453818790.git.johannes.schindelin@gmx.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.