From f7102e1fc411aac2bc0547b232c8fd4eebc2fc3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Tue, 15 Nov 2022 22:36:11 +0100 Subject: [PATCH] Add first test --- tests/one.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 tests/one.sh diff --git a/tests/one.sh b/tests/one.sh new file mode 100755 index 0000000..9d207e3 --- /dev/null +++ b/tests/one.sh @@ -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 \ No newline at end of file