提交 f66eef1f 编写于 作者: S Sam Brannen

Fix SortedPropertiesTests on JDK 9+

上级 eacc531c
......@@ -132,8 +132,11 @@ public class SortedPropertiesTests {
String[] lines = lines(baos);
assertThat(lines).containsExactly( //
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>", //
assertThat(lines).isNotEmpty();
// Leniently match first line due to differences between JDK 8 and JDK 9+.
String regex = "<\\?xml .*\\?>";
assertThat(lines[0]).matches(regex);
assertThat(lines).filteredOn(line -> !line.matches(regex)).containsExactly( //
"<!DOCTYPE properties SYSTEM \"http://java.sun.com/dtd/properties.dtd\">", //
"<properties>", //
"<entry key=\"color\">blue</entry>", //
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册