]> Savannah Git Hosting - gnulib.git/commitdiff
test-framework-sh: Improve portability to native Windows and OS/2.
authorBruno Haible <bruno@clisp.org>
Mon, 15 Jan 2024 14:50:52 +0000 (15:50 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 18 Jan 2024 08:32:13 +0000 (09:32 +0100)
Reported by KO Myung-Hun <komh78@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00037.html>.

* tests/init.sh (setup_): Set IFS, like in Autoconf's _AS_PATH_WALK and
in build-aux/relocatable.sh.in.

ChangeLog
tests/init.sh

index 48e6ff0817834d6fb4428473b27939a0395e6d14..74505f2e70b48c7c75d7f52a31c906fe0ace19b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-01-15  Bruno Haible  <bruno@clisp.org>
+
+       test-framework-sh: Improve portability to native Windows and OS/2.
+       Reported by KO Myung-Hun <komh78@gmail.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00037.html>.
+       * tests/init.sh (setup_): Set IFS, like in Autoconf's _AS_PATH_WALK and
+       in build-aux/relocatable.sh.in.
+
 2024-01-12  Bruno Haible  <bruno@clisp.org>
 
        jit/cache tests: Fix link error.
index aef5eea80833bca4ed36d0aecc80dc82bf885e2e..d8889e858bd18ce86945170988f04391f52cd3c4 100644 (file)
@@ -434,11 +434,11 @@ setup_ ()
 
   # Remove relative and non-accessible directories from PATH, including '.'
   # and Zero-length entries.
-  saved_IFS="$IFS"
-  IFS=:
+  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}"