aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.bats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils.bats')
-rw-r--r--tests/utils.bats18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/utils.bats b/tests/utils.bats
new file mode 100644
index 0000000..ab74020
--- /dev/null
+++ b/tests/utils.bats
@@ -0,0 +1,18 @@
+#!/usr/bin/env bats
+
+setup() {
+ # get the containing directory of this file
+ # use $BATS_TEST_FILENAME instead of ${BASH_SOURCE[0]} or $0,
+ # as those will point to the bats executable's location or the preprocessed file respectively
+ DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )"
+ source "$(readlink -f "$DIR/../pinentry-rofi.sh")"
+}
+
+@test "succesful setup" {
+ :
+}
+
+@test "converting Assuan protocol errors: 0" {
+ result="$(assuan_result 0)"
+ [ "$result" == "ERR 0 no error" ]
+}