forked from bblanchon/ArduinoJson
Fix lax parsing of true
, false
, and null
(fixes #1781)
This commit is contained in:
@ -9,7 +9,8 @@
|
||||
TEST_CASE("Invalid JSON input") {
|
||||
const char* testCases[] = {"'\\u'", "'\\u000g'", "'\\u000'", "'\\u000G'",
|
||||
"'\\u000/'", "\\x1234", "6a9", "1,",
|
||||
"2]", "3}"};
|
||||
"nulL", "tru3", "fals3", "2]",
|
||||
"3}"};
|
||||
const size_t testCount = sizeof(testCases) / sizeof(testCases[0]);
|
||||
|
||||
DynamicJsonDocument doc(4096);
|
||||
@ -23,9 +24,6 @@ TEST_CASE("Invalid JSON input") {
|
||||
|
||||
TEST_CASE("Invalid JSON input that should pass") {
|
||||
const char* testCases[] = {
|
||||
"nulL",
|
||||
"tru3",
|
||||
"fals3",
|
||||
"'\\ud83d'", // leading surrogate without a trailing surrogate
|
||||
"'\\udda4'", // trailing surrogate without a leading surrogate
|
||||
"'\\ud83d\\ud83d'", // two leading surrogates
|
||||
|
Reference in New Issue
Block a user