Skip to content

Commit 130dafc

Browse files
committed
CODEC-313: Add unit test
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
1 parent d2b68eb commit 130dafc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/test/java/org/apache/commons/codec/net/QuotedPrintableCodecTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ public void testSoftLineBreakEncode() throws Exception {
227227
assertEquals(qpdata, qpcodec.encode(decoded));
228228
}
229229

230+
@Test
231+
public void testTooShortByteArray() throws Exception{
232+
final QuotedPrintableCodec qpcodec = new QuotedPrintableCodec(true);
233+
assertNull(qpcodec.encode("AA"), "Result should be null.");
234+
}
235+
230236
@Test
231237
public void testTrailingSpecial() throws Exception {
232238
final QuotedPrintableCodec qpcodec = new QuotedPrintableCodec(true);

0 commit comments

Comments
 (0)