[Pkg-gnupg-commit] [gnupg2] 72/124: tests: Test '--quick-set-primary-uid'.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Apr 5 15:55:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit fde885bbc47a4bf14a8570ac62e68adc8cf47a6e
Author: Justus Winter <justus at g10code.com>
Date:   Tue Mar 21 16:21:49 2017 +0100

    tests: Test '--quick-set-primary-uid'.
    
    * tests/openpgp/quick-key-manipulation.scm: Test
    '--quick-set-primary-uid'.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 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 9fd5b6b..85e56ca 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 `(, at gpg --quick-set-primary-uid ,(exact alpha) ,alpha))
+(call-check `(, at 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 `(, at 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 `(, at GPG --quick-revoke-uid ,(exact bravo) ,alpha))
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list