Skip to content

Commit f4329b2

Browse files
committed
Added test
1 parent 72e1c93 commit f4329b2

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎src/test/java/com/github/underscore/LodashTest.java‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,24 @@ void xmpToJson5() {
11131113
U.xmlToJson("<Comment stringValue=\"============================\"/>"));
11141114
}
11151115

1116+
@Test
1117+
void xmpToJson6() {
1118+
assertEquals(
1119+
"{\n"
1120+
+ " \"root\": {\n"
1121+
+ " \"a\": 1\n"
1122+
+ " },\n"
1123+
+ " \"omit-xml-declaration\": \"yes\"\n"
1124+
+ "}",
1125+
U.xmlToJson("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
1126+
+ "<root>\n"
1127+
+ " <root>\n"
1128+
+ " <a number=\"true\">1</a>\n"
1129+
+ " </root>\n"
1130+
+ " <omit-xml-declaration>yes</omit-xml-declaration>\n"
1131+
+ "</root>"));
1132+
}
1133+
11161134
@Test
11171135
void xmlToJsonMinimum() {
11181136
assertEquals(

0 commit comments

Comments
 (0)