diff options
Diffstat (limited to 'testsuite/testing.sh')
-rwxr-xr-x | testsuite/testing.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/testing.sh b/testsuite/testing.sh index a57c4d68d..22c640faf 100755 --- a/testsuite/testing.sh +++ b/testsuite/testing.sh | |||
@@ -36,6 +36,20 @@ | |||
36 | export FAILCOUNT=0 | 36 | export FAILCOUNT=0 |
37 | export SKIP= | 37 | export SKIP= |
38 | 38 | ||
39 | # Helper for helpers. Oh my... | ||
40 | |||
41 | test x"$ECHO" != x"" || { | ||
42 | ECHO="echo" | ||
43 | test x"`echo -ne`" = x"" || { | ||
44 | # Compile and use a replacement 'echo' which understands -e -n | ||
45 | ECHO="$PWD/echo-ne" | ||
46 | test -x "$ECHO" || { | ||
47 | gcc -Os -o "$ECHO" ../scripts/echo.c || exit 1 | ||
48 | } | ||
49 | } | ||
50 | export ECHO | ||
51 | } | ||
52 | |||
39 | # Helper functions | 53 | # Helper functions |
40 | 54 | ||
41 | optional() | 55 | optional() |
@@ -73,7 +87,7 @@ testing() | |||
73 | 87 | ||
74 | $ECHO -ne "$3" > expected | 88 | $ECHO -ne "$3" > expected |
75 | $ECHO -ne "$4" > input | 89 | $ECHO -ne "$4" > input |
76 | [ -z "$VERBOSE" ] || echo "echo '$5' | $2" | 90 | [ -z "$VERBOSE" ] || echo "echo -ne '$5' | $2" |
77 | $ECHO -ne "$5" | eval "$2" > actual | 91 | $ECHO -ne "$5" | eval "$2" > actual |
78 | RETVAL=$? | 92 | RETVAL=$? |
79 | 93 | ||