Add first test

This commit is contained in:
Lukáš Kucharczyk 2022-11-15 22:36:11 +01:00
parent 90f436fb23
commit f7102e1fc4
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
1 changed files with 20 additions and 0 deletions

20
tests/one.sh Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -ueo pipefail
SCRIPT_DIR=$(dirname $(readlink -f "$0"))
DB_FILE="${SCRIPT_DIR}/test.db"
setUp() {
tag init "$DB_FILE"
}
tearDown() {
[ -f "$DB_FILE" ] && rm "$DB_FILE"
}
testDbCreated() {
assertTrue "[[ -f \"$DB_FILE\" ]]"
}
. ../../shunit2/shunit2