Skip to content

Commit 58fab46

Browse files
committed
Merge branch '2.15' into 2.16
2 parents a473325 + 75bdb73 commit 58fab46

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/test/java/com/fasterxml/jackson/databind/ObjectMapperTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ public void testCopyWith() throws Exception {
202202
assertEquals("Black", readResult.get("color").asText());
203203
assertEquals(true, readResult.get("free").asBoolean());
204204
assertEquals(204, readResult.get("pages").asInt());
205-
String readResultAsString = "{\n \"color\" : \"Black\",\n \"free\" : \"true\",\n \"pages\" : \"204.04\"\n}";
206-
assertEquals(readResultAsString, mapper.writeValueAsString(readResult));
205+
String readResultAsString = _unifyLFs("{\n \"color\" : \"Black\",\n \"free\" : \"true\",\n \"pages\" : \"204.04\"\n}");
206+
assertEquals(readResultAsString, _unifyLFs(mapper.writeValueAsString(readResult)));
207207

208208
// validate properties
209209
Boolean mapperConfig1 = mapper._deserializationConfig.isEnabled(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES);
@@ -224,6 +224,10 @@ public void testCopyWith() throws Exception {
224224
);
225225
}
226226

227+
private String _unifyLFs(String doc) {
228+
return doc.replaceAll("[\r\n]+", "\n");
229+
}
230+
227231
public void testFailedCopy() throws Exception
228232
{
229233
NoCopyMapper src = new NoCopyMapper();

0 commit comments

Comments
 (0)