diff options
Diffstat (limited to 'tests/01_add')
-rw-r--r-- | tests/01_add | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/01_add b/tests/01_add index 15ff2b0..74c9558 100644 --- a/tests/01_add +++ b/tests/01_add @@ -13,19 +13,16 @@ function run_add { wait $! if [ $? -ne 0 ]; then - echo -e $ERROR" ck crashed." - exit 1 + err "ck crashed." fi # check db if [ "$(sqlite3 $BIN/ckdb "select name from program where name = '$1'")" != "$1" ]; then - echo -e $ERROR $1" is not in the db." - exit 1 + err "$1 is not in the db." fi if [ "$(sqlite3 $BIN/ckdb "select path from config where path = '$BIN/$2'")" != "$BIN/$2" ]; then - echo -e $ERROR $2" is not in the db." - exit 1 + err "$2 is not in the db." fi # check files @@ -35,13 +32,11 @@ function run_add { fi if [ ! -f $TEST_LOCATION/$FOLDER/$1/$2 ]; then - echo -e $ERROR$2" No move (add "$3" "$4")" - exit 1 + err "$2 No move (add $3 $4)" fi if [ ! -L $BIN/$2 ]; then - echo -e $ERROR$2" No symlink (add "$3" "$4")" - exit 1 + err "$2 No symlink (add $3 $4)" fi } |