]> git.ipfire.org Git - thirdparty/git.git/commit
t3070: skip ls-files tests with backslash patterns on Windows
authorKristofer Karlsson <krka@spotify.com>
Thu, 28 May 2026 09:00:48 +0000 (09:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 May 2026 20:25:43 +0000 (05:25 +0900)
commit8c84e6802c0e23503bfe655dadcdc4a15de7373a
treead18449b90536dad08099d5fbf47636d06c49d1a
parent94f057755b7941b321fd11fec1b2e3ca5313a4e0
t3070: skip ls-files tests with backslash patterns on Windows

On Windows (MINGW), backslashes in pathspecs are silently converted to
forward slashes (directory separators), which changes the glob semantics.
This causes 36 test failures in t3070-wildmatch when the "via ls-files"
variants test patterns containing backslash escapes (e.g. '\[ab]',
'[\-_]', '[A-\\]').

The wildmatch function itself handles these patterns correctly — only the
ls-files code path fails because pathspec parsing converts the
backslashes before they reach the glob matcher.

Skip these ls-files tests on platforms where BSLASHPSPEC is not set,
which is the existing prereq that captures exactly this semantic:
"backslashes in pathspec are not directory separators."

Signed-off-by: Kristofer Karlsson <krka@spotify.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3070-wildmatch.sh