Test that skipValue is strict on unquoted strings.
This commit is contained in:
parent
b5ae3c945a
commit
dd9ae67af5
@ -566,6 +566,16 @@ public final class JsonReaderTest extends TestCase {
|
||||
}
|
||||
}
|
||||
|
||||
public void testStrictUnquotedStringsWithSkipValue() throws IOException {
|
||||
JsonReader reader = new JsonReader(new StringReader("[a]"));
|
||||
reader.beginArray();
|
||||
try {
|
||||
reader.skipValue();
|
||||
fail();
|
||||
} catch (MalformedJsonException expected) {
|
||||
}
|
||||
}
|
||||
|
||||
public void testLenientUnquotedStrings() throws IOException {
|
||||
JsonReader reader = new JsonReader(new StringReader("[a]"));
|
||||
reader.setLenient(true);
|
||||
|
Loading…
Reference in New Issue
Block a user