Add gap and unicode parse fixtures#9
Open
primeBeri wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR summary — Add gap and unicode parse fixtures
Summary
Adds 30 new parse assertions and one document pair to the shared fixture suite,
derived from the Huml.Net (.NET reference implementation) test suite. All cases
are implementation-agnostic: they only assert whether a given input parses
successfully or throws a parse error, with no dependency on token types, AST
structure, error messages, or runtime behaviour.
Changes
assertions/mixed.json— 30 new entries (12 gaps + 18 unicode)documents/unicode.huml— new document fixturedocuments/unicode.json— expected parse output forunicode.humlCategories
Gaps (v0.2)
Parse behaviours that were exercised by Huml.Net's test suite but absent from
the shared suite. Covers:
TRUE,FALSE,NULLare accepted (same aslowercase)
"my-key": 42)3.14),nan,inf,hex (
0xFF)key::with no following content is an error"a:b")Unicode (v0.2)
Covers the boundary between bare keys (ASCII-only identifiers) and quoted keys,
and validates that non-ASCII content is accepted inside quoted strings and
quoted keys:
U+200F) and LTR mark (U+200E) inside strings are acceptedNotes
mixed.jsonambiguous_empty_vector_space(key:: # comment);the new
ambiguous_empty_vector_bare(key::) tests a distinct code path\uXXXXescapesto keep the files ASCII-safe