1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-26 06:12:06 +01:00

SOP: Add test to ensure that armoring already-armored data is idempotent

This commit is contained in:
Paul Schaub 2022-11-17 14:28:29 +01:00
parent 6ba7e91f2a
commit b9152d5cde

View file

@ -97,4 +97,14 @@ public class ArmorCmdTest extends CLITest {
assertEquals(SOPGPException.UnsupportedOption.EXIT_CODE, exitCode); assertEquals(SOPGPException.UnsupportedOption.EXIT_CODE, exitCode);
assertEquals(0, out.size()); assertEquals(0, out.size());
} }
@Test
public void armorAlreadyArmoredDataIsIdempotent() throws IOException {
pipeStringToStdin(key);
ByteArrayOutputStream armorOut = pipeStdoutToStream();
assertSuccess(executeCommand("armor"));
String armored = armorOut.toString();
assertEquals(key, armored);
}
} }