+2017-10-07 KO Myung-Hun <komh@chollian.net>
+
+ test-framework-sh: Fix 'invalid path dir' error.
+ On OS/2, a path separator is ';' not ':'. And ':' is used as a
+ separator between a drive letter and directory parts.
+ As a result, an absolute path such as x:/path/to/dir on OS/2 is
+ treated as an invalid path dir.
+ * tests/init.sh (PATH_SEPARATOR): Set at startup.
+ (path_prepend_): '?:*' is also an absolute path. Use $PATH_SEPARATOR
+ instead of hard coded ':'.
+
2017-10-07 Bruno Haible <bruno@clisp.org>
vma-iter: Fix truncated result on Linux (regression from 2017-09-26).
ME_=`expr "./$0" : '.*/\(.*\)$'`
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
# We use a trap below for cleanup. This requires us to go through
# hoops to get the right exit status transported through the handler.
# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
path_dir_=$1
case $path_dir_ in
'') fail_ "invalid path dir: '$1'";;
- /*) abs_path_dir_=$path_dir_;;
+ /* | ?:*) abs_path_dir_=$path_dir_;;
*) abs_path_dir_=$initial_cwd_/$path_dir_;;
esac
case $abs_path_dir_ in
- *:*) fail_ "invalid path dir: '$abs_path_dir_'";;
+ *$PATH_SEPARATOR*) fail_ "invalid path dir: '$abs_path_dir_'";;
esac
- PATH="$abs_path_dir_:$PATH"
+ PATH="$abs_path_dir_$PATH_SEPARATOR$PATH"
# Create an alias, FOO, for each FOO.exe in this directory.
create_exe_shims_ "$abs_path_dir_" \