Stop pretty printing from truncating content starts as valid JSON
Fixes gh-730
This commit is contained in:
@@ -64,7 +64,14 @@ public class PrettyPrintingContentModifierTests {
|
||||
this.outputCapture.expect(isEmptyString());
|
||||
assertThat(new PrettyPrintingContentModifier().modifyContent(content.getBytes(), null))
|
||||
.isEqualTo(content.getBytes());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nonJsonContentThatInitiallyLooksLikeJsonIsHandledGracefully() throws Exception {
|
||||
String content = "\"abc\",\"def\"";
|
||||
this.outputCapture.expect(isEmptyString());
|
||||
assertThat(new PrettyPrintingContentModifier().modifyContent(content.getBytes(), null))
|
||||
.isEqualTo(content.getBytes());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user