Subject: added new secret key with different passphrase
From: Daniel Kahn Gillmor <[email-masked]>
Date: Tue, 11 Oct 2016 20:59:43 -0400

Adding a new secret key with a different passphrase should allow us to
differentiate between passing the passphrase explicitly and relying on
the agent + pinentry.
---
 t/000_setup.t                  |  2 +-
 test/new_secret.pgp            | 58 ++++++++++++++++++++++++++++++++++++++++++
 test/secret-keys/1.0.test      |  4 +++
 test/secret-keys/1.modern.test |  5 ++++
 4 files changed, 68 insertions(+), 1 deletion(-)
 create mode 100644 test/new_secret.pgp

diff --git a/t/000_setup.t b/t/000_setup.t
index a8e3042..b183241 100644
--- a/t/000_setup.t
+++ b/t/000_setup.t
@@ -19,7 +19,7 @@ TEST
     copy('test/gpg.conf', 'test/gnupghome/gpg.conf');
     reset_handles();
 
-    my $pid = $gnupg->import_keys(command_args => [ 'test/public_keys.pgp', 'test/secret_keys.pgp' ],
+    my $pid = $gnupg->import_keys(command_args => [ 'test/public_keys.pgp', 'test/secret_keys.pgp', 'test/new_secret.pgp' ],
                                   options => [ 'batch'],
                                   handles => $handles);
     waitpid $pid, 0;
diff --git a/test/new_secret.pgp b/test/new_secret.pgp
new file mode 100644
index 0000000..5feb72c
--- /dev/null
+++ b/test/new_secret.pgp
@@ -0,0 +1,58 @@
+-----BEGIN PGP PRIVATE KEY BLOCK-----
+
+=ftgB
+-----END PGP PRIVATE KEY BLOCK-----
diff --git a/test/secret-keys/1.0.test b/test/secret-keys/1.0.test
index 129d472..f8239a9 100644
--- a/test/secret-keys/1.0.test
+++ b/test/secret-keys/1.0.test
@@ -5,3 +5,7 @@ uid                  GnuPG test key (for testing purposes only)
 uid                  Foo Bar (1)
 ssb    768g/2E854A6B 2000-02-06
 
+sec   2048R/B6747DDC 2016-10-12
+uid                  GnuPG::Interface Test key <[email-masked]>
+ssb   2048R/AE441D0F 2016-10-12
+
diff --git a/test/secret-keys/1.modern.test b/test/secret-keys/1.modern.test
index 3e46407..42b27a1 100644
--- a/test/secret-keys/1.modern.test
+++ b/test/secret-keys/1.modern.test
@@ -6,3 +6,8 @@ uid           [ unknown] GnuPG test key (for testing purposes only)
 uid           [ unknown] Foo Bar (1)
 ssb   elg768 2000-02-06 [E]
 
+sec   rsa2048 2016-10-12 [SC]
+      278F850AA702911F1318F0A61B913CE9B6747DDC
+uid           [ unknown] GnuPG::Interface Test key <[email-masked]>
+ssb   rsa2048 2016-10-12 [E]
+