]> 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 15:05:00 +0000 (16:05 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 18 Jan 2024 08:33:09 +0000 (09:33 +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_): Test for an absolute directory name like
Autoconf does.

ChangeLog
tests/init.sh

index 9c4bbb64cecb90c650ce55d93c70f1f2c50189f5..512b97dd7bd3a87193904a7de06fb2620d3561d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +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_): Test for an absolute directory name like
+       Autoconf does.
+
        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>.
index b8a400cff10ea12104ec267eb3969db69f666f88..c5ec5cfd5893fccfeb6dfc0a999f12309fc82e2a 100644 (file)
@@ -439,7 +439,7 @@ setup_ ()
   for dir in $PATH; do
     IFS="$saved_IFS"
     case "$dir" in
-      /*)
+      [\\/]* | ?:[\\/]*)
         test -d "$dir/." || continue
         new_PATH="${new_PATH}${new_PATH:+$PATH_SEPARATOR}${dir}"
         ;;