t0008: skip trailing space test on Windows
authorJohannes Sixt <j6t@kdbg.org>
Tue, 11 Mar 2014 07:46:40 +0000 (08:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Mar 2014 19:11:49 +0000 (12:11 -0700)
The Windows API does not preserve file names with trailing spaces (and
dots), but rather strips them. Our tools (MSYS bash, git) base the POSIX
emulation on the Windows API. As a consequence, it is impossible for bash
on Windows to allocate a file whose name has trailing spaces, and for git
to stat such a file. Both operate on a file whose name has the spaces
stripped. Skip the test that needs such a file name.

Note that we do not use (another incarnation of) prerequisite FUNNYNAMES.
The reason is that FUNNYNAMES is intended to represent a property of the
file system. But the inability to have trailing spaces in a file name is
a property of the Windows API. The file system (NTFS) does not have this
limitation.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0008-ignores.sh
index bbaf6b5e9edb4c8dc3e435952d261e72b3042f01..63beb99828cc17d2ec8218a6470b62c02a78806b 100755 (executable)
@@ -793,7 +793,7 @@ EOF
        test_cmp err.expect err
 '
 
-test_expect_success 'quoting allows trailing whitespace' '
+test_expect_success !MINGW 'quoting allows trailing whitespace' '
        rm -rf whitespace &&
        mkdir whitespace &&
        >"whitespace/trailing  " &&