[TEST] Make test pass on windows - jackson uses platform line.separator which messes up comparisons

This commit is contained in:
Simon Willnauer 2015-09-26 21:25:49 +02:00
parent e01a74d608
commit ebe02ec54a

View File

@ -196,7 +196,7 @@ public class HasChildQueryBuilderTests extends AbstractQueryTestCase<HasChildQue
// now assert that we actually generate the same JSON
XContentBuilder builder = XContentFactory.jsonBuilder().prettyPrint();
queryBuilder.toXContent(builder, ToXContent.EMPTY_PARAMS);
assertEquals(query, builder.string());
assertEquals(query, builder.string().replaceAll("\\r\\n", "\n")); // jackson uses system linefeed - will fail on windows otherwise
}
}