From b04075ced5cd950a39b33898694e1c6a4f09a35b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 15 Jan 2024 15:50:52 +0100 Subject: [PATCH] test-framework-sh: Improve portability to native Windows and OS/2. Reported by KO Myung-Hun in . * tests/init.sh (setup_): Set IFS, like in Autoconf's _AS_PATH_WALK and in build-aux/relocatable.sh.in. --- ChangeLog | 8 ++++++++ tests/init.sh | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 60c338356b..30a9f6bc9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +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_): Set IFS, like in Autoconf's _AS_PATH_WALK and + in build-aux/relocatable.sh.in. + 2024-01-12 Bruno Haible qsort_r: Fix compilation error in C++ mode on FreeBSD 14.0/powerpc64. diff --git a/tests/init.sh b/tests/init.sh index 0494097e9f..d8889e858b 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -1,6 +1,6 @@ # source this file; set up for tests -# Copyright (C) 2009-2023 Free Software Foundation, Inc. +# Copyright (C) 2009-2024 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -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}" -- 2.39.5