aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.bats
blob: ab74020def90523e46d197a4046d116940d8b5c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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" ]
}