File tree 1 file changed +6
-2
lines changed
src/test/java/com/fasterxml/jackson/databind
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -221,8 +221,8 @@ public void testCopyWith() throws JsonProcessingException {
221
221
assertEquals ("Black" , readResult .get ("color" ).asText ());
222
222
assertEquals (true , readResult .get ("free" ).asBoolean ());
223
223
assertEquals (204 , readResult .get ("pages" ).asInt ());
224
- String readResultAsString = "{\n \" color\" : \" Black\" ,\n \" free\" : \" true\" ,\n \" pages\" : \" 204.04\" \n }" ;
225
- assertEquals (readResultAsString , mapper .writeValueAsString (readResult ));
224
+ String readResultAsString = _unifyLFs ( "{\n \" color\" : \" Black\" ,\n \" free\" : \" true\" ,\n \" pages\" : \" 204.04\" \n }" ) ;
225
+ assertEquals (readResultAsString , _unifyLFs ( mapper .writeValueAsString (readResult ) ));
226
226
227
227
// validate properties
228
228
Boolean mapperConfig1 = mapper ._deserializationConfig .isEnabled (DeserializationFeature .FAIL_ON_NULL_FOR_PRIMITIVES );
@@ -243,6 +243,10 @@ public void testCopyWith() throws JsonProcessingException {
243
243
);
244
244
}
245
245
246
+ private String _unifyLFs (String doc ) {
247
+ return doc .replaceAll ("[\r \n ]+" , "\n " );
248
+ }
249
+
246
250
public void testFailedCopy () throws Exception
247
251
{
248
252
NoCopyMapper src = new NoCopyMapper ();
You can’t perform that action at this time.
0 commit comments