From fde885bbc47a4bf14a8570ac62e68adc8cf47a6e Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 21 Mar 2017 16:21:49 +0100 Subject: tests: Test '--quick-set-primary-uid'. * tests/openpgp/quick-key-manipulation.scm: Test '--quick-set-primary-uid'. Signed-off-by: Justus Winter --- tests/openpgp/quick-key-manipulation.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/openpgp/quick-key-manipulation.scm b/tests/openpgp/quick-key-manipulation.scm index 9fd5b6bb0..85e56ca60 100755 --- a/tests/openpgp/quick-key-manipulation.scm +++ b/tests/openpgp/quick-key-manipulation.scm @@ -73,6 +73,17 @@ (assert (= 2 (count-uids-of-secret-key alpha))) (assert (= 2 (count-uids-of-secret-key bravo))) +(info "Checking that we can mark an user ID as primary.") +(call-check `(,@gpg --quick-set-primary-uid ,(exact alpha) ,alpha)) +(call-check `(,@gpg --quick-set-primary-uid ,(exact alpha) ,bravo)) +;; XXX I don't know how to verify this. The keylisting does not seem +;; to indicate the primary UID. + +(info "Checking that we get an error making non-existant user ID the primary one.") +(catch '() + (call-check `(,@GPG --quick-set-primary-uid ,(exact alpha) ,charlie)) + (error "Expected an error, but get none.")) + (info "Checking that we can revoke a user ID...") (call-check `(,@GPG --quick-revoke-uid ,(exact bravo) ,alpha)) -- cgit v1.2.3