From: Bruno Haible Date: Mon, 15 Jan 2024 14:56:40 +0000 (+0100) Subject: test-framework-sh: Improve portability to native Windows and OS/2. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=52ad1bf86a3d3b8484ed93d0786941f82dd01b0f;p=gnulib.git test-framework-sh: Improve portability to native Windows and OS/2. Reported by KO Myung-Hun in . * tests/init.sh (setup_): In new_PATH, use $PATH_SEPARATOR instead of ':'. --- diff --git a/ChangeLog b/ChangeLog index 74505f2e70..9c4bbb64ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-01-15 Bruno Haible + test-framework-sh: Improve portability to native Windows and OS/2. + Reported by KO Myung-Hun in + . + * tests/init.sh (setup_): In new_PATH, use $PATH_SEPARATOR instead of + ':'. + test-framework-sh: Improve portability to native Windows and OS/2. Reported by KO Myung-Hun in . diff --git a/tests/init.sh b/tests/init.sh index d8889e858b..b8a400cff1 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -436,13 +436,13 @@ setup_ () # and Zero-length entries. saved_IFS="$IFS"; IFS="$PATH_SEPARATOR" new_PATH= - sep_= for dir in $PATH; do IFS="$saved_IFS" case "$dir" in - /*) test -d "$dir/." || continue - new_PATH="${new_PATH}${sep_}${dir}" - sep_=':';; + /*) + test -d "$dir/." || continue + new_PATH="${new_PATH}${new_PATH:+$PATH_SEPARATOR}${dir}" + ;; esac done IFS="$saved_IFS"