File tree Expand file tree Collapse file tree
src/test/java/com/github/underscore Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1163,8 +1163,24 @@ void xmpToJson7() {
11631163 + " \" #omit-xml-declaration\" : \" yes\" \n "
11641164 + "}" ,
11651165 U .xmlToJson ("<Comment stringValue='a'/>" ));
1166- assertThrows (IllegalArgumentException .class , () -> U .xmlToJson ("<Comment stringValue=\" a'/>" ));
1167- assertThrows (IllegalArgumentException .class , () -> U .xmlToJson ("<Comment stringValue='a\" />" ));
1166+ assertEquals (
1167+ "{\n "
1168+ + " \" Comment\" : {\n "
1169+ + " },\n "
1170+ + " \" #omit-xml-declaration\" : \" yes\" \n "
1171+ + "}" ,
1172+ U .xmlToJson ("<Comment stringValue='a\" '/>" ));
1173+ assertEquals (
1174+ "{\n "
1175+ + " \" Comment\" : {\n "
1176+ + " \" -stringValue\" : \" a'\" ,\n "
1177+ + " \" -self-closing\" : \" true\" \n "
1178+ + " },\n "
1179+ + " \" #omit-xml-declaration\" : \" yes\" \n "
1180+ + "}" ,
1181+ U .xmlToJson ("<Comment stringValue=\" a'\" />" ));
1182+ assertThrows (IllegalArgumentException .class , () -> U .xmlToJson ("<Comment stringValue=\" a'/>" ));
1183+ assertThrows (IllegalArgumentException .class , () -> U .xmlToJson ("<Comment stringValue='a\" />" ));
11681184 }
11691185
11701186 @ Test
You can’t perform that action at this time.
0 commit comments