mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 22:32:07 +01:00
SOP: Add test to ensure that armoring already-armored data is idempotent
This commit is contained in:
parent
6ba7e91f2a
commit
b9152d5cde
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue