parse_string scanned for `"` and `\` but accepted every other byte, including raw control characters. RFC 8259 §7 requires those bytes to be escaped inside a string; an unescaped one is invalid JSON and must surface a parse error, not be silently accepted. Add `BadControlChar` to JsonParseError and reject any unescaped byte < 0x20 in the string body scan (which gates the decode path too, so escaped forms like \t/\n/ still decode correctly; 0x20 and 0x7F are not over-rejected). Regression test in examples/0714: raw 0x09/0x0A/0x00 each raise BadControlChar via `?`/`!`; a positive case proves the escaped forms still decode to the right bytes. All prior assertions kept.
44 lines
653 B
Plaintext
44 lines
653 B
Plaintext
root-is-object: ok
|
|
member-count: ok
|
|
key-order-0: ok
|
|
string-plain: ok
|
|
string-escaped: ok
|
|
array-len: ok
|
|
array-pos: ok
|
|
array-neg: ok
|
|
bool-value: ok
|
|
null-value: ok
|
|
nested-pair: ok
|
|
plain-is-view: ok
|
|
escaped-allocated: ok
|
|
round-trip: ok
|
|
ws-count: ok
|
|
ws-first: ok
|
|
ws-last: ok
|
|
empty-array: ok
|
|
empty-object: ok
|
|
uni-len: ok
|
|
uni-A: ok
|
|
uni-e1: ok
|
|
uni-e2: ok
|
|
uni-s0: ok
|
|
uni-s1: ok
|
|
uni-s2: ok
|
|
uni-s3: ok
|
|
err-truncated: ok
|
|
err-bad-escape: ok
|
|
err-trailing-junk: ok
|
|
err-bad-token: ok
|
|
err-fraction: ok
|
|
err-leading-zero: ok
|
|
err-overflow: ok
|
|
err-unterminated: ok
|
|
err-raw-tab: ok
|
|
err-raw-lf: ok
|
|
err-raw-nul: ok
|
|
esc-ctrl-len: ok
|
|
esc-tab: ok
|
|
esc-lf: ok
|
|
esc-u: ok
|
|
=== DONE ===
|