summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlberto <alberto.ruiz@codethink.co.uk>2011-10-03 12:40:44 +0100
committerAlberto <alberto.ruiz@codethink.co.uk>2011-10-03 12:40:44 +0100
commit003acb3935e03f5752c3dbe2f16af8d8b7f121e3 (patch)
treeb5029837da87c67c47d7bb4da779dc606571ee54 /tests
parent3c650a94ad9b4a3c17c156fd253f17a9d2e47190 (diff)
downloadtbdiff-003acb3935e03f5752c3dbe2f16af8d8b7f121e3.tar.gz
Fix sanity check in test framework
Diffstat (limited to 'tests')
-rwxr-xr-xtests/00_simple_file.sh2
-rw-r--r--tests/test_lib.sh8
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/00_simple_file.sh b/tests/00_simple_file.sh
index 85ecbcd..efe3161 100755
--- a/tests/00_simple_file.sh
+++ b/tests/00_simple_file.sh
@@ -27,4 +27,4 @@ function check_results {
check_same_mtime $ORG_FILE $TGT_FILE
}
-main
+main $@
diff --git a/tests/test_lib.sh b/tests/test_lib.sh
index aab5ceb..fa1c612 100644
--- a/tests/test_lib.sh
+++ b/tests/test_lib.sh
@@ -24,6 +24,12 @@ function check_content {
}
function start {
+ if [ $# -ne 2 ]
+ then
+ echo "ERROR: Not enough arguments."
+ cleanup_and_exit
+ fi
+
if [ ! -f $1 ]
then
echo "ERROR: $1 is an invalid tbdiff-create path" 1>&2
@@ -43,7 +49,7 @@ function cleanup_and_exit {
}
function main {
- start
+ start $@
echo -n "$TEST_ID Setting up $TEST_NAME test: "
setup
if [ $? -ne 0 ]