+2011-05-07 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ depmod tests: fix bug in depmodes list extraction
+ * tests/depmod-tests.sh (get_depmodes): Use `echo $all_depmodes'
+ instead of `... | tr "$nl" "$sp"' to strip extra whitespaces and
+ newlines from `$all_depmodes'. The latter idiom with `tr' is
+ wrong since it gets run before `./defs' is sourced, and thus `$nl'
+ and `$sp' are undefined.
+ Bug revealad by FreeBSD tr(1) implementation, which doesn't accept
+ empty strings as arguments.
+
2011-05-01 Stefano Lattarini <stefano.lattarini@gmail.com>
tests: extend tests on dependency tracking with VPATH
{
# Keep this in sync with the contents of depend.m4.
all_depmodes=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$1" \
- | grep -v '^none$' | tr "$nl" "$sp"` \
+ | grep -v '^none$'` \
+ && : Turn newlines and tabs into spaces, and strip extra whitespace. \
+ && all_depmodes=`echo $all_depmodes` \
&& test -n "$all_depmodes" || {
echo "$2: failed to extract list of valid depmodes from '$1'" >&2
exit 99