From: Ralf Wildenhues Date: Sun, 3 Oct 2010 09:56:20 +0000 (+0200) Subject: tests: fix ar-lib.test for echo that interprets backslashes. X-Git-Tag: v1.11.3~3^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c35a65c05d1cf4f8d95ce546ae4c7b2d6bd19ac5;p=platform%2Fupstream%2Fautomake.git 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. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index d829a23..bef372e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-03 Ralf Wildenhues + + 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 compile: implement library search to support MSVC static linking diff --git a/tests/ar-lib.test b/tests/ar-lib.test index 4759b65..31d87ed 100755 --- a/tests/ar-lib.test +++ b/tests/ar-lib.test @@ -21,15 +21,15 @@ 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