diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-23 23:45:21 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-23 23:45:21 -0400 |
commit | d5872b7bae380edfee91565073840e6ab4adc626 (patch) | |
tree | 6a5a3731e3425ca5163fe47308eb5a07b242a6cb /test | |
parent | a5097c68226ab198b854f54f3200c9eb0901c9f3 (diff) |
add a librerelease test
Diffstat (limited to 'test')
-rw-r--r-- | test/librerelease-test.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/librerelease-test.sh b/test/librerelease-test.sh index 1c864f7..ac42f56 100644 --- a/test/librerelease-test.sh +++ b/test/librerelease-test.sh @@ -48,3 +48,21 @@ EOF diff "$tmpdir/list-correct" "$tmpdir/list" } + +it_fails_if_gpgkey_not_set() { + echo 'unset GPGKEY' >> "$XDG_CONFIG_HOME"/pacman/makepkg.conf + + WORKDIR="$tmpdir/workdir" + mkdir -p "$WORKDIR/staging/repo1" "$WORKDIR/staging/repo2/sub" + touch \ + "$WORKDIR/staging/repo1/file1" \ + "$WORKDIR/staging/repo1/file2" \ + "$WORKDIR/staging/repo2/file with spaces" \ + "$WORKDIR/staging/repo2/sub/subfolder" + unset WORKDIR + LC_ALL=C librerelease -l >"$tmpdir/stdout" 2>"$tmpdir/stderr" || stat=$? + + [[ $stat != 0 ]] + empty "$tmpdir/stdout" + grep GPGKEY "$tmpdir/stderr" +} |