From c34050cc5ba22b27b7fda9af86cf314130798748 Mon Sep 17 00:00:00 2001 From: Alessio Sanfratello Date: Fri, 2 Oct 2026 22:58:33 +0200 Subject: [PATCH] test(fixtures): update fixtures to version 4.1.2 --- CHANGELOG.md | 4 ++-- scripts/update_fixtures.py | 2 +- tests/fixtures/README.md | 2 +- tests/fixtures/encode/primitives.json | 8 ++++++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0e440b..6ac2408 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,9 @@ from 0.9. ### Added -- Full support for [TOON specification 4.1](https://github.com/toon-format/spec/blob/v4.1.1/SPEC.md): +- Full support for [TOON specification 4.1](https://github.com/toon-format/spec/blob/v4.1.2/SPEC.md): keyed tabular objects, nested field groups, comment lines, canonical empty - arrays, and every strict-mode check. All official fixtures of spec `v4.1.1` pass. + arrays, and every strict-mode check. All official fixtures of spec `v4.1.2` pass. - A `json`-style interface: `dumps`, `dump`, `loads`, `load`, with keyword-only options. `encode` and `decode` are aliases of `dumps` and `loads`. - `default` and `sort_keys` options for encoding; `parse_float`, `parse_int`, diff --git a/scripts/update_fixtures.py b/scripts/update_fixtures.py index 18a64a6..68dbe7c 100644 --- a/scripts/update_fixtures.py +++ b/scripts/update_fixtures.py @@ -3,7 +3,7 @@ # /// """Replace tests/fixtures with the conformance fixtures of a TOON specification release. -Usage: uv run scripts/update_fixtures.py v4.1.1 +Usage: uv run scripts/update_fixtures.py v4.1.2 """ from __future__ import annotations diff --git a/tests/fixtures/README.md b/tests/fixtures/README.md index b4b99de..8b1acc9 100644 --- a/tests/fixtures/README.md +++ b/tests/fixtures/README.md @@ -2,5 +2,5 @@ The `encode/` and `decode/` directories are copied verbatim from the [TOON specification repository](https://github.com/toon-format/spec/tree/main/tests/fixtures) -at tag `v4.1.1`. Do not edit them by hand: run `uv run scripts/update_fixtures.py ` +at tag `v4.1.2`. Do not edit them by hand: run `uv run scripts/update_fixtures.py ` to replace them with another release. diff --git a/tests/fixtures/encode/primitives.json b/tests/fixtures/encode/primitives.json index 9d6041a..826c95e 100644 --- a/tests/fixtures/encode/primitives.json +++ b/tests/fixtures/encode/primitives.json @@ -273,6 +273,14 @@ "input": "#hello", "expected": "\"#hello\"", "specSection": "7.2" + }, + { + "name": "quotes a root string starting with U+FEFF", + "input": "\ufeff8", + "expected": "\"\ufeff8\"", + "specSection": "7.2", + "note": "Unquoted, a decoder would remove the U+FEFF as a byte-order mark (ยง12) and read the number 8", + "minSpecVersion": "4.1" } ] }