tests: Test '--quick-set-primary-uid'.

* tests/openpgp/quick-key-manipulation.scm: Test
'--quick-set-primary-uid'.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2017-03-21 16:21:49 +01:00
parent d17840c3f4
commit fde885bbc4
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020
1 changed files with 11 additions and 0 deletions

View File

@ -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))