From ec3fd8971e87c82b2768b5b9dcbcd569edc3259b Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Sat, 9 Nov 2013 11:17:21 -0800 Subject: [PATCH] Use full key id in key id retrieval test + add separate short key id test --- t/all-020-get.t | 2 +- t/all-070-get-short.t | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 t/all-070-get-short.t diff --git a/t/all-020-get.t b/t/all-020-get.t index 8adaa3f..a96f896 100755 --- a/t/all-020-get.t +++ b/t/all-020-get.t @@ -5,7 +5,7 @@ set -e cd t ../onak -b -c test.conf add < ../keys/noodles.key -if ! ../onak -c test.conf get 0x2DA8B985 2> /dev/null | \ +if ! ../onak -c test.conf get 0x94FA372B2DA8B985 2> /dev/null | \ grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----'; then echo "* Did not correctly retrieve key by keyid." exit 1 diff --git a/t/all-070-get-short.t b/t/all-070-get-short.t new file mode 100755 index 0000000..8adaa3f --- /dev/null +++ b/t/all-070-get-short.t @@ -0,0 +1,14 @@ +#!/bin/sh +# Check we can retrieve a key by keyid + +set -e + +cd t +../onak -b -c test.conf add < ../keys/noodles.key +if ! ../onak -c test.conf get 0x2DA8B985 2> /dev/null | \ + grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----'; then + echo "* Did not correctly retrieve key by keyid." + exit 1 +fi + +exit 0 -- 2.39.5