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-Tag: v1.0~521 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=bf2fb4a4f41542a39074ea826cccca44bc67f854;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 e0788e2d74..c43af9729d 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 7d7b186451..98c97a9028 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="$save_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"