+2001-01-16 Akim Demaille <akim@epita.fr>
+
+ * tests/atgeneral.m4 (AT_data_files): Fix the computation of PATH.
+
2001-01-16 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (_AC_INIT_LOG_COMPLETE): Eve out from AC_OUTPUT.
In each case the expected result is of course @file{fullness} containing
@samp{matter} and @file{void} being empty.
+Don't try to redirect the standard error of a command substitution: it
+must be done @emph{inside} the command substitution: when running
+@samp{echo `cd /zorglub` 2>/dev/null} expect the error message to
+escape, while @samp{echo `cd /zorglub 2>/dev/null`} works properly.
+
+It is worth noting that Zsh (but not Ash nor Bash) makes it possible
+in assignments though: @samp{foo=`cd /zorglub` 2>/dev/null}.
+
@node Shell Substitutions, Assignments, File Descriptors, Portable Shell
@subsection Shell Substitutions
at_path=`pwd`
at_IFS_save=$IFS
IFS=:
-for at_dir in $AUTOTEST_PATH:$PATH; do
- at_path=$at_path:`cd "$at_dir" && pwd`
+for at_dir in $AUTOTEST_PATH $PATH; do
+ # There might be directories that don't exist.
+ at_dir=`cd "$at_dir" 2>/dev/null && pwd`
+ test -n "$at_dir" && at_path=$at_path:$at_dir
done
IFS=$at_IFS_save
PATH=$at_path
at_path=`pwd`
at_IFS_save=$IFS
IFS=:
-for at_dir in $AUTOTEST_PATH:$PATH; do
- at_path=$at_path:`cd "$at_dir" && pwd`
+for at_dir in $AUTOTEST_PATH $PATH; do
+ # There might be directories that don't exist.
+ at_dir=`cd "$at_dir" 2>/dev/null && pwd`
+ test -n "$at_dir" && at_path=$at_path:$at_dir
done
IFS=$at_IFS_save
PATH=$at_path