1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00

Merge pull request #49 from madsager/master

Add test that an invalid escape sequence results in a JSONException a…
This commit is contained in:
Sean Leary 2016-06-07 21:29:25 -05:00
commit 40f170b508

View file

@ -1924,4 +1924,10 @@ public class JSONObjectTest {
public void optQueryWithSyntaxError() {
new JSONObject().optQuery("invalid");
}
@Test(expected = JSONException.class)
public void invalidEscapeSequence() {
String json = "{ \"\\url\": \"value\" }";
new JSONObject(json);
}
}