* tests/ar-lib.test: Use printf instead of echo. Avoid test -a.
More robust quoting.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+2010-10-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ tests: fix ar-lib.test for echo that interprets backslashes.
+ * tests/ar-lib.test: Use printf instead of echo. Avoid test -a.
+ More robust quoting.
+
2010-09-21 Peter Rosin <peda@lysator.liu.se>
compile: implement library search to support MSVC static linking
set -e
cp "$testsrcdir/../lib/ar-lib" .
-# Use a dummy lib, since lib isn't readily available on all systems
+# Use a dummy lib, since lib isn't readily available on all systems.
cat >lib <<'END'
#! /bin/sh
-if test x"$2" = x-LIST -a $3 = fake.lib; then
+if test x"$2" = x-LIST && test x"$3" = xfake.lib; then
echo fake.obj
-elif test x"$2" = x-LIST -a $3 = fake2.lib; then
- echo dir\\fake2.obj
+elif test x"$2" = x-LIST && test x"$3" = xfake2.lib; then
+ printf "%s\n" "dir\\fake2.obj"
else
- echo "lib $@"
+ printf "%s\n" "lib $*"
fi
END