From abe49fa54fbd4d13f8424532abced8c3bc9afd0c Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 11 Jul 2008 21:41:14 +0000 Subject: testsuite: uniformly use $ECHO with -n -e --- testsuite/runtest | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'testsuite/runtest') diff --git a/testsuite/runtest b/testsuite/runtest index 624de8f..cade871 100755 --- a/testsuite/runtest +++ b/testsuite/runtest @@ -3,6 +3,19 @@ # Usage: # runtest [applet1] [applet2...] +# Helper for helpers. Oh my... +test x"$ECHO" != x"" || { + ECHO="echo" + test x"`echo -ne`" = x"" || { + # Compile and use a replacement 'echo' which understands -e -n + ECHO="$PWD/echo-ne" + test -x "$ECHO" || { + gcc -Os -o "$ECHO" ../scripts/echo.c || exit 1 + } + } + export ECHO +} + # Run one old-style test. # Tests are stored in applet/testcase shell scripts. # They are run using "sh -x -e applet/testcase". -- cgit v1.1