diff options
author | Alberto <alberto.ruiz@codethink.co.uk> | 2011-10-03 12:40:44 +0100 |
---|---|---|
committer | Alberto <alberto.ruiz@codethink.co.uk> | 2011-10-03 12:40:44 +0100 |
commit | 003acb3935e03f5752c3dbe2f16af8d8b7f121e3 (patch) | |
tree | b5029837da87c67c47d7bb4da779dc606571ee54 /tests | |
parent | 3c650a94ad9b4a3c17c156fd253f17a9d2e47190 (diff) | |
download | tbdiff-003acb3935e03f5752c3dbe2f16af8d8b7f121e3.tar.gz |
Fix sanity check in test framework
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/00_simple_file.sh | 2 | ||||
-rw-r--r-- | tests/test_lib.sh | 8 |
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 ] |