skip redundant CRs while parsing ascii armor headers

This commit is contained in:
Vincent Breitmoser
2017-04-02 22:21:57 +02:00
parent 7caf02a4e6
commit 5cb81fef94
2 changed files with 4 additions and 4 deletions

View File

@@ -19,9 +19,9 @@ public class ArmoredInputStreamTest {
@Test
public void armoredInputStream__withDifferentLineEndings() throws Exception {
// these are generated by GPG4USB, see https://github.com/gpg4usb/gpg4usb/issues/25
ArmoredInputStream stream1 = new ArmoredInputStream(UncachedKeyringTest.class.getResourceAsStream("/armored_crcrlf.asc"));
ArmoredInputStream stream2 = new ArmoredInputStream(UncachedKeyringTest.class.getResourceAsStream("/armored_crlf.asc"));
ArmoredInputStream stream3 = new ArmoredInputStream(UncachedKeyringTest.class.getResourceAsStream("/armored_lf.asc"));
ArmoredInputStream stream1 = new ArmoredInputStream(ArmoredInputStreamTest.class.getResourceAsStream("/armored_crcrlf.asc"));
ArmoredInputStream stream2 = new ArmoredInputStream(ArmoredInputStreamTest.class.getResourceAsStream("/armored_crlf.asc"));
ArmoredInputStream stream3 = new ArmoredInputStream(ArmoredInputStreamTest.class.getResourceAsStream("/armored_lf.asc"));
assertEquals(1, stream1.getArmorHeaders().length);
assertEquals("Comment: comment content", stream1.getArmorHeaders()[0]);