summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Burschka2012-11-02 23:22:58 +0100
committerChristoph Burschka2012-11-02 23:22:58 +0100
commite12727c65eb0a623a22df373c8d69a620c387ff4 (patch)
treec5ebafb61e29e8db5060a369ffc75f2e4cd126d6
parentAbort if phpBB 3.1 not installed; avoid error handler; set globals. (diff)
downloadejabberd-auth-php-e12727c65eb0a623a22df373c8d69a620c387ff4.tar.gz
Make test script independent of CWD.
-rwxr-xr-xtests/test9
1 files changed, 5 insertions, 4 deletions
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.in>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