mingw: avoid illegal filename in t9118

On Windows' file systems, file names with trailing dots are forbidden. The POSIX emulation layer used by Git for Windows' Subversion emulates those file names, therefore the test adding the file would actually succeed, but when we would ask git.exe (which does not leverage the POSIX emulation layer) to check out the tree, it would fail. Let's just guard the test using a filename that is illegal on Windows by the MINGW prereq. This lets t9118-git-svn-funky-branch-names.sh pass in Git for Windows' SDK. 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 75e005ec541e46f3cdec15143306c7189fd65a95
1 file changed +9 -3
t/t9118-git-svn-funky-branch-names.sh
+9 -3
@@ -23,8 +23,11 @@ test_expect_success 'setup svnrepo' '
23 "$svnrepo/pr ject/branches/$scary_uri" &&
24 svn_cmd cp -m "leading dot" "$svnrepo/pr ject/trunk" \
25 "$svnrepo/pr ject/branches/.leading_dot" &&
26 - svn_cmd cp -m "trailing dot" "$svnrepo/pr ject/trunk" \
27 - "$svnrepo/pr ject/branches/trailing_dot." &&
26 + if test_have_prereq !MINGW
27 + then
28 + svn_cmd cp -m "trailing dot" "$svnrepo/pr ject/trunk" \
29 + "$svnrepo/pr ject/branches/trailing_dot."
30 + fi &&
31 svn_cmd cp -m "trailing .lock" "$svnrepo/pr ject/trunk" \
32 "$svnrepo/pr ject/branches/trailing_dotlock.lock" &&
33 svn_cmd cp -m "reflog" "$svnrepo/pr ject/trunk" \
@@ -45,7 +48,10 @@ test_expect_success 'test clone with funky branch names' '
48 git rev-parse "refs/remotes/origin/more%20fun%20plugin!" &&
49 git rev-parse "refs/remotes/origin/$scary_ref" &&
50 git rev-parse "refs/remotes/origin/%2Eleading_dot" &&
48 - git rev-parse "refs/remotes/origin/trailing_dot%2E" &&
51 + if test_have_prereq !MINGW
52 + then
53 + git rev-parse "refs/remotes/origin/trailing_dot%2E"
54 + fi &&
55 git rev-parse "refs/remotes/origin/trailing_dotlock%2Elock" &&
56 git rev-parse "refs/remotes/origin/$non_reflog"
57 )