From e12727c65eb0a623a22df373c8d69a620c387ff4 Mon Sep 17 00:00:00 2001 From: Christoph Burschka Date: Fri, 2 Nov 2012 23:22:58 +0100 Subject: Make test script independent of CWD. --- tests/test | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/test') diff --git a/tests/test b/tests/test index 4d68705..72a72ad 100755 --- a/tests/test +++ b/tests/test @@ -1,10 +1,11 @@ -php test.php > test.in -php ../main.php test.out -if [ -z "$(diff test.out test.successful)" ] +p=`dirname $0` +php $p/test.php > $p/test.in +php $p/../main.php <$p/test.in>$p/test.out +if [ -z "$(diff $p/test.out $p/test.successful)" ] then echo "Test successful." else echo "Test unsuccessful. Check activity logs." fi -rm test.in test.out \ No newline at end of file +rm $p/test.in $p/test.out \ No newline at end of file -- cgit v1.1