mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-23 03:17:58 +01:00
Add test for PGPainless.asciiArmor(key, stream)
This commit is contained in:
parent
5bccc1960e
commit
dac059c702
1 changed files with 8 additions and 0 deletions
|
@ -128,6 +128,14 @@ public class ArmorUtilsTest {
|
|||
assertTrue(ascii.startsWith("-----BEGIN PGP PRIVATE KEY BLOCK-----\n"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAsciiArmorToStream() throws IOException, PGPException {
|
||||
PGPSecretKeyRing secretKeys = TestKeys.getEmilSecretKeyRing();
|
||||
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||
PGPainless.asciiArmor(secretKeys, bytes);
|
||||
assertTrue(bytes.toString().startsWith("-----BEGIN PGP PRIVATE KEY BLOCK-----\n"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetCustomVersionHeader() throws IOException {
|
||||
ArmoredOutputStreamFactory.setVersionInfo("MyVeryFirstOpenPGPProgram 1.0");
|
||||
|
|
Loading…
Reference in a new issue