Improve toml-test compliance to 99.5%#1
Merged
dereuromark merged 6 commits intomasterfrom Mar 25, 2026
Merged
Conversation
Parser improvements:
- Add date/time tokens as valid keys (e.g., 2001-02-03 = 1)
- Split leading-zero floats into dotted key parts (01.23 = x → {"01": {"23": x}})
- Allow explicit definition of implicit tables ([x.y] followed by [x])
- Add control character validation in comments and multi-line strings
- Fix array parsing to reject double commas ([1,,2])
- Fix inline table scope isolation for dotted key validation
Decoder improvements:
- Handle array tables in nested path traversal
- Normalize no-seconds times to include :00
- Preserve original datetime precision (no unnecessary microseconds)
Also renames tests/Fixtures to tests/fixtures for consistency.
Cover tab characters used as whitespace/indentation in: - Before keys - Around equals signs - Multiline array indentation - Multiline inline table indentation - Mixed tabs and spaces - After table headers - In comments - Between array/inline table elements - Inside table header brackets
Verify tab characters are preserved in source-aware encoding: - Tab around keys and equals signs - Tab indentation in multiline arrays - Tab indentation in multiline inline tables - Mixed tab and space whitespace
- Restore Feature Comparison and Library Details sections - Keep benchmark data and updated compliance numbers - Add round-trip tests for tab whitespace preservation
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.
Summary
2001-02-03 = 1)01.23).unless it's fractional secondstests/Fixturestotests/fixtures(lowercase for non-class folders)Test Results
The single valid test failure is due to a PHP limitation with null byte property names. Invalid test "failures" are mostly TOML 1.0 strict tests that TOML 1.1 relaxes (multiline inline tables, trailing commas, hex escapes).