PureYAML/Tests
Mihaela M b7bcfe1a01 fix(parsing): enforce the full YAML 1.2 double-quoted escape table
The double-quoted escape decoder recognized only a subset of escapes
(" \ \/ \b \f \n \r \t \u) and silently passed any other character
through. That accepted invalid escapes such as \. and \', and mangled
valid ones the subset omitted: \x and \U hex escapes, \v \e \0, the named
\N \_ \L \P, and a backslash before a space, were emitted as their literal
letters (\x0d became the text x0d).

The decoder now maps every escape in the YAML 1.2 table to its character,
reads \x (8-bit) and \U (32-bit) hex escapes alongside \u, treats a
backslash before a line break as an escaped line break that joins the
lines with no separator, and rejects an unknown or truncated escape with
a diagnostic. Single-character escapes move to a lookup table so the
decoder stays within the complexity limit.

Measured against the official YAML test-suite, parse-level conformance
rises from 247/333 (74.2%) to 249/333 (74.8%) as two invalid documents
are now rejected, and value-level from 166 to 170 of comparable cases
(90.4%) as the previously-mangled escapes decode correctly, with no
regression.
2026-06-27 16:19:25 +02:00
..
Fixtures test(corpus): add public real yaml seeds 2026-06-06 08:24:12 +02:00
ACMEZephyrFixtureTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
AdditionalCoverageTests.swift test: cover the remaining low-level paths 2026-06-26 08:59:24 +02:00
AnchoredIndentedNodeParsingTests.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
AnchoredMappingKeyTests.swift fix(parsing): allow an anchor or tag on a non-first mapping key 2026-06-27 00:21:38 +02:00
ArbitraryAnyDecisionTests.swift docs(api): reject arbitrary any conversion 2026-06-05 14:34:17 +02:00
BlockScalarChompingTests.swift fix(parsing): preserve leading blank lines in block scalars 2026-06-26 08:42:16 +02:00
BlockScalarTrailingCommentTests.swift fix(parsing): comments and over-indented blanks ending block scalars 2026-06-27 15:34:13 +02:00
CodableCompatibilityFixtures.swift feat(codable): broaden compatibility coverage 2026-06-05 12:49:20 +02:00
CodableCompatibilityTests.swift Add machine-readable validation reports 2026-06-05 20:39:32 +02:00
CodableTypeMatrixTests.swift test: round-trip the full scalar type matrix through Codable containers 2026-06-26 09:04:54 +02:00
CodingTests.swift feat(coding): add unkeyed typed conversion 2026-06-05 12:23:52 +02:00
CollectionCompatibilityFixtures.swift fix(parser): match block continuation parsing 2026-06-05 22:12:12 +02:00
CommentWhitespaceTests.swift fix(parsing): reject a comment glued to earlier content on its line 2026-06-27 15:53:16 +02:00
ComplexMappingKeyCodableTests.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
ComplexMappingKeyDumperTests.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
ComplexMappingKeyParsingTests.swift fix(parsing): an explicit key with no value maps to null 2026-06-26 22:28:13 +02:00
ComplexMappingKeyTestSupport.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
ComplexMappingKeyValidationTests.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
DiagnosticValidationReportTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
DirectiveTests.swift fix(parsing): ignore an unrecognized directive instead of rejecting it 2026-06-26 22:20:18 +02:00
DocumentationExampleTests.swift feat(emitting): dump YAML streams 2026-06-05 17:14:41 +02:00
DocumentMarkerNodeTests.swift fix(parsing): fold a document-root plain scalar across column-1 lines 2026-06-26 21:30:49 +02:00
DoubleQuotedEscapeTests.swift fix(parsing): enforce the full YAML 1.2 double-quoted escape table 2026-06-27 16:19:25 +02:00
DoubleQuotedFoldingTests.swift fix(parsing): fold line breaks in multi-line double-quoted scalars 2026-06-26 21:13:13 +02:00
DownstreamDocumentFixtures.swift test(compatibility): add downstream document fixtures 2026-06-05 13:45:23 +02:00
DownstreamDocumentTests.swift feat(parser): expand YAML merge keys 2026-06-05 15:12:55 +02:00
DumperEmptyCollectionTests.swift Add machine-readable validation reports 2026-06-05 20:39:32 +02:00
DumperTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
EmitterCorpusTests.swift feat(emitting): broaden literal block fixtures 2026-06-05 13:37:33 +02:00
EventStreamingParserTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
ExplicitKeyTests.swift fix(parsing): an explicit key with no value maps to null 2026-06-26 22:28:13 +02:00
JSONCompatibilityTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
KeyedCodingTests.swift feat(coding): add unkeyed typed conversion 2026-06-05 12:23:52 +02:00
LiteralBlockEmissionFixtures.swift feat(emitting): broaden literal block fixtures 2026-06-05 13:37:33 +02:00
MergeKeyCompatibilityTests.swift feat(parser): expand YAML merge keys 2026-06-05 15:12:55 +02:00
ModelTests.swift feat(parsing): add reader scanner core 2026-06-05 07:40:23 +02:00
NumericCodingLadderTests.swift test: cover numeric ladder, NaN hashing, unkeyed edges, error paths 2026-06-26 07:50:08 +02:00
ParsingAliasTests.swift Harden parser against real YAML fixtures 2026-06-05 19:34:30 +02:00
ParsingCompatibilityTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
ParsingErrorPathTests.swift test: cover numeric ladder, NaN hashing, unkeyed edges, error paths 2026-06-26 07:50:08 +02:00
ParsingErrorTests.swift refactor(parsing): remove three unreachable ParseError cases 2026-06-26 08:37:53 +02:00
ParsingEventTests.swift Add production validation reports 2026-06-05 20:23:20 +02:00
ParsingIndentationRegressionTests.swift Add production validation reports 2026-06-05 20:23:20 +02:00
ParsingMultilineScalarTests.swift fix(parsing): fold a plain scalar value that begins on its own line 2026-06-26 18:52:09 +02:00
ParsingNestingLimitTests.swift fix(parsing): bound nesting depth so pathological input errors instead of crashing 2026-06-23 09:29:45 +02:00
ParsingTests.swift Harden parser against real YAML fixtures 2026-06-05 19:34:30 +02:00
PerformancePhaseTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
PreflightScannerTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
QuotedKeyTests.swift fix(parsing): allow a space before the colon of a quoted mapping key 2026-06-27 01:19:28 +02:00
RealYAMLCorpusPropertyTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
RealYAMLCorpusTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
RealYAMLFixtureTests.swift Harden parser against real YAML fixtures 2026-06-05 19:34:30 +02:00
RoundTripDemonstrationTests.swift test: demonstrate yaml/json parsing and generation round-trips 2026-06-08 00:13:56 +02:00
ScalarCompatibilityFixtures.swift Add scalar compatibility corpus 2026-06-05 13:07:04 +02:00
ScannerTests.swift fix(parsing): ignore an unrecognized directive instead of rejecting it 2026-06-26 22:20:18 +02:00
SingleQuotedFoldingTests.swift fix(parsing): fold line breaks in multi-line single-quoted scalars 2026-06-26 21:18:55 +02:00
StreamDumpingTests.swift feat(emitting): dump YAML streams 2026-06-05 17:14:41 +02:00
StreamParsingTests.swift fix(parsing): fold a document-root plain scalar across column-1 lines 2026-06-26 21:30:49 +02:00
TaggedCompatibilityTests.swift feat(tagged): add tag-preserving validation 2026-06-05 15:35:52 +02:00
TaggedConstructorTests.swift feat(tagged): add typed constructor policy 2026-06-05 16:24:11 +02:00
TestSupport.swift Harden parser against real YAML fixtures 2026-06-05 19:34:30 +02:00
UnkeyedCodingFixtures.swift test(coding): add sequence fixtures and contract gate 2026-06-05 12:33:09 +02:00
UnkeyedCodingTests.swift Add machine-readable validation reports 2026-06-05 20:39:32 +02:00
UnkeyedContainerEdgeTests.swift test: cover numeric ladder, NaN hashing, unkeyed edges, error paths 2026-06-26 07:50:08 +02:00
UnkeyedEncodingFixtures.swift Add machine-readable validation reports 2026-06-05 20:39:32 +02:00
UnkeyedFailureFixtures.swift test(coding): add sequence fixtures and contract gate 2026-06-05 12:33:09 +02:00
UnsupportedYAMLGapsFixtures.swift fix(parsing): ignore an unrecognized directive instead of rejecting it 2026-06-26 22:20:18 +02:00
ValidationBuiltinRuleTests.swift feat(coding): add scalar typed conversion 2026-06-05 11:45:00 +02:00
ValidationCorpusFixtures.swift feat(parser): expand YAML merge keys 2026-06-05 15:12:55 +02:00
ValidationCorpusSupport.swift test(validation): expand fixture corpus 2026-06-05 14:29:52 +02:00
ValidationCorpusTests.swift test(validation): expand fixture corpus 2026-06-05 14:29:52 +02:00
ValidationFailureFixtureTests.swift Harden parser against real YAML fixtures 2026-06-05 19:34:30 +02:00
ValidationModelTests.swift feat(coding): add scalar typed conversion 2026-06-05 11:45:00 +02:00
ValidationModeTests.swift feat(coding): add scalar typed conversion 2026-06-05 11:45:00 +02:00
ValidationReportTests.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
ValidationTests.swift feat(validation): add predicate-gated rules 2026-06-05 11:21:23 +02:00
ValidationTestSupport.swift test(validation): harden diagnostics corpus 2026-06-05 10:46:28 +02:00
ValueHashableTests.swift test: cover numeric ladder, NaN hashing, unkeyed edges, error paths 2026-06-26 07:50:08 +02:00
YAMLTestSuiteConformanceTests.swift test: add value-level YAML conformance against in.json 2026-06-26 20:18:32 +02:00