Added print statement in test. Works for gpg. Next up: fun with netpgp ENGINE-73
authorKrista Grothoff <krista@pep-project.org>
Tue, 16 Aug 2016 11:21:57 +0200
branchENGINE-73
changeset 1020b80ab1442557
parent 1019 e38a6ec264bd
child 1021 90d21813bfce
Added print statement in test. Works for gpg. Next up: fun with netpgp
test/pgp_list_keys_test.cc
     1.1 --- a/test/pgp_list_keys_test.cc	Mon Aug 15 21:06:38 2016 +0200
     1.2 +++ b/test/pgp_list_keys_test.cc	Tue Aug 16 11:21:57 2016 +0200
     1.3 @@ -6,6 +6,18 @@
     1.4  
     1.5  using namespace std;
     1.6  
     1.7 +void print_id_list(identity_list* idl) {
     1.8 +    for ( ; idl != NULL; idl = idl->next) {
     1.9 +        if (idl->ident) {
    1.10 +            cout << "Identity:" << endl;
    1.11 +            cout << "\tFPR: " << idl->ident->address << endl;
    1.12 +            cout << "\tAddress: " << idl->ident->fpr << endl; 
    1.13 +            cout << "\tUID: " << idl->ident->user_id << endl;
    1.14 +            cout << "\tName: " << idl->ident->username << endl << endl;
    1.15 +        }
    1.16 +    }
    1.17 +}
    1.18 +
    1.19  int main() {
    1.20      cout << "\n*** pgp_list_keys_test ***\n\n";
    1.21  
    1.22 @@ -19,6 +31,7 @@
    1.23  
    1.24      identity_list* all_the_ids = NULL;
    1.25      list_keys(session, &all_the_ids);
    1.26 +    print_id_list(all_the_ids);
    1.27      free_identity_list(all_the_ids);
    1.28  
    1.29