mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-04-10 00:28:36 +02:00
Fix test by comparing to CRLF'd plaintext
This commit is contained in:
parent
cb6dde4e39
commit
bfdbac0f2d
1 changed files with 6 additions and 2 deletions
|
@ -138,6 +138,10 @@ public class RoundTripInlineSignInlineVerifyCmdTest extends CLITest {
|
|||
"\n" +
|
||||
"There is only one Lord of the Keys, only one who can bend them to his will. And he does not share power.";
|
||||
|
||||
private static final String MESSAGE_CRLF = "One does not simply use OpenPGP!\r\n" +
|
||||
"\r\n" +
|
||||
"There is only one Lord of the Keys, only one who can bend them to his will. And he does not share power.";
|
||||
|
||||
@Test
|
||||
public void createCleartextSignedMessage() throws IOException {
|
||||
File key = writeFile("key.asc", KEY_1);
|
||||
|
@ -153,7 +157,7 @@ public class RoundTripInlineSignInlineVerifyCmdTest extends CLITest {
|
|||
String cleartextSigned = ciphertextOut.toString();
|
||||
assertTrue(cleartextSigned.startsWith("-----BEGIN PGP SIGNED MESSAGE-----\n" +
|
||||
"Hash: "));
|
||||
assertTrue(cleartextSigned.contains(MESSAGE));
|
||||
assertTrue(cleartextSigned.contains(MESSAGE_CRLF));
|
||||
assertTrue(cleartextSigned.contains("\n-----BEGIN PGP SIGNATURE-----\n"));
|
||||
assertTrue(cleartextSigned.endsWith("-----END PGP SIGNATURE-----\n"));
|
||||
}
|
||||
|
@ -203,7 +207,7 @@ public class RoundTripInlineSignInlineVerifyCmdTest extends CLITest {
|
|||
"--verifications-out", verifications.getAbsolutePath(),
|
||||
cert.getAbsolutePath()));
|
||||
|
||||
assertEquals(MESSAGE, plaintextOut.toString());
|
||||
assertEquals(MESSAGE_CRLF, plaintextOut.toString());
|
||||
String verificationString = readStringFromFile(verifications);
|
||||
assertTrue(verificationString.contains(CERT_1_SIGNING_KEY));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue