]> the.earth.li Git - onak.git/blobdiff - t/all-080-get-subkey.t
Cleanup tests to be able to run from a different directory
[onak.git] / t / all-080-get-subkey.t
index 449b5687f7017bb54ead83ecdeec2d10fc0c4df3..e934dd8e3112692cdb6bf4976a1aebc3a68c4cc9 100755 (executable)
@@ -9,14 +9,14 @@ if [ "$2" = "file" ]; then
        exit 0
 fi
 
-cd t
-../onak -b -c $1 add < ../keys/noodles.key
-if ! ../onak -c $1 get 0x045281F1B9A66E35 2> /dev/null | \
+cd ${WORKDIR}
+${BUILDDIR}/onak -b -c $1 add < ${TESTSDIR}/../keys/noodles.key
+if ! ${BUILDDIR}/onak -c $1 get 0x045281F1B9A66E35 2> /dev/null | \
        grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----'; then
        echo "* Did not correctly retrieve key by subkey id."
        exit 1
 fi
-if ! ../onak -c $1 get 0xFF162FC5CF3FBAD1 2> /dev/null | \
+if ! ${BUILDDIR}/onak -c $1 get 0xFF162FC5CF3FBAD1 2> /dev/null | \
        grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----'; then
        echo "* Did not correctly retrieve key by subkey id."
        exit 1