mirror of
https://github.com/git-for-windows/git.git
synced 2026-05-05 17:40:24 -05:00
tests: use the correct path separator with BusyBox
BusyBox-w32 is a true Win32 application, i.e. it does not come with a POSIX emulation layer. That also means that it does *not* use the Unix convention of separating the entries in the PATH variable using colons, but semicolons. However, there are also BusyBox ports to Windows which use a POSIX emulation layer such as Cygwin's or MSYS2's runtime, i.e. using colons as PATH separators. As a tell-tale, let's use the presence of semicolons in the PATH variable: on Unix, it is highly unlikely that it contains semicolons, and on Windows (without POSIX emulation), it is virtually guaranteed, as everybody should have both $SYSTEMROOT and $SYSTEMROOT/system32 in their PATH. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -69,7 +69,7 @@ test_expect_success 'run_command does not try to execute a directory' '
|
||||
cat bin2/greet
|
||||
EOF
|
||||
|
||||
PATH=$PWD/bin1:$PWD/bin2:$PATH \
|
||||
PATH=$PWD/bin1$PATH_SEP$PWD/bin2$PATH_SEP$PATH \
|
||||
test-tool run-command run-command greet >actual 2>err &&
|
||||
test_cmp bin2/greet actual &&
|
||||
test_must_be_empty err
|
||||
@@ -86,7 +86,7 @@ test_expect_success POSIXPERM 'run_command passes over non-executable file' '
|
||||
cat bin2/greet
|
||||
EOF
|
||||
|
||||
PATH=$PWD/bin1:$PWD/bin2:$PATH \
|
||||
PATH=$PWD/bin1$PATH_SEP$PWD/bin2$PATH_SEP$PATH \
|
||||
test-tool run-command run-command greet >actual 2>err &&
|
||||
test_cmp bin2/greet actual &&
|
||||
test_must_be_empty err
|
||||
@@ -106,7 +106,7 @@ test_expect_success POSIXPERM,SANITY 'unreadable directory in PATH' '
|
||||
git config alias.nitfol "!echo frotz" &&
|
||||
chmod a-rx local-command &&
|
||||
(
|
||||
PATH=./local-command:$PATH &&
|
||||
PATH=./local-command$PATH_SEP$PATH &&
|
||||
git nitfol >actual
|
||||
) &&
|
||||
echo frotz >expect &&
|
||||
|
||||
Reference in New Issue
Block a user