Skip to content

Commit 68c3915

Browse files
committed
fixup! WIP tests: accommodate for BusyBox-w32
1 parent 45091f8 commit 68c3915

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

t/test-lib.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,15 @@ Darwin)
17621762
test_set_prereq GREP_STRIPS_CR
17631763
test_set_prereq WINDOWS
17641764
GIT_TEST_CMP="GIT_DIR=/dev/null git diff --no-index --ignore-cr-at-eol --"
1765+
case "$($SHELL --help 2>&1)" in
1766+
*BusyBox*)
1767+
# Unlike the MSYS2 Bash, BusyBox does not translate /dev/null
1768+
# to the Windows null device when spawning the native git.exe,
1769+
# and the minimal CI SDK provides no /dev/null for it to open;
1770+
# name nul directly so test_cmp (and --ignore-cr-at-eol) works.
1771+
GIT_TEST_CMP="GIT_DIR=nul git diff --no-index --ignore-cr-at-eol --"
1772+
;;
1773+
esac
17651774
if ! type iconv >/dev/null 2>&1
17661775
then
17671776
iconv () {

0 commit comments

Comments
 (0)