Skip to content

Commit 1d85476

Browse files
committed
t9200: skip tests when $PWD contains a colon
On Windows, the current working directory is pretty much guaranteed to contain a colon. If we feed that path to CVS, it mistakes it for a separator between host and port, though. This has not been a problem so far because Git for Windows uses MSYS2's Bash using a POSIX emulation layer that also pretends that the current directory is a Unix path (at least as long as we're in a shell script). However, that is rather limiting, as Git for Windows also explores other ports of other Unix shells. One of those is BusyBox-w32's ash, which is a native port (i.e. *not* using any POSIX emulation layer, and certainly not emulating Unix paths). So let's just detect if there is a colon in $PWD and punt in that case. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c8abd5a commit 1d85476

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/t9200-git-cvsexportcommit.sh

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ if ! test_have_prereq PERL; then
1111
test_done
1212
fi
1313

14+
case "$PWD" in
15+
*:*)
16+
skip_all='cvs would get confused by the colon in `pwd`; skipping tests'
17+
test_done
18+
;;
19+
esac
20+
1421
cvs >/dev/null 2>&1
1522
if test $? -ne 1
1623
then

0 commit comments

Comments
 (0)