]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Avoid using "echo -n" for portability reasons
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 14 Aug 2010 19:56:57 +0000 (21:56 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 14 Aug 2010 19:56:57 +0000 (21:56 +0200)
test.sh

diff --git a/test.sh b/test.sh
index da521d69212966d4085acdf8cf8b94283e3102a3..e3594e40f9f6a6617ca11d52faa4b039f60cdc05 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -398,10 +398,16 @@ EOF
     CCACHE_COMPILERCHECK="echo ./compiler.sh" $CCACHE ./compiler.sh -c test1.c
     checkstat 'cache hit (preprocessed)' 1
     checkstat 'cache miss' 1
-    CCACHE_COMPILERCHECK='echo bar' $CCACHE ./compiler.sh -c test1.c
+    cat <<EOF >foobar.sh
+#!/bin/sh
+echo foo
+echo bar
+EOF
+    chmod +x foobar.sh
+    CCACHE_COMPILERCHECK='./foobar.sh' $CCACHE ./compiler.sh -c test1.c
     checkstat 'cache hit (preprocessed)' 1
     checkstat 'cache miss' 2
-    CCACHE_COMPILERCHECK='echo -n b; echo ar' $CCACHE ./compiler.sh -c test1.c
+    CCACHE_COMPILERCHECK='echo foo; echo bar' $CCACHE ./compiler.sh -c test1.c
     checkstat 'cache hit (preprocessed)' 2
     checkstat 'cache miss' 2