From ffbf8cffe5581650795ff4f3171ffd3fc1703cb6 Mon Sep 17 00:00:00 2001 From: Waozi Date: Tue, 29 Sep 2026 21:27:02 -0300 Subject: [PATCH] Treat vertical tab and form feed as whitespace in the KSS fuzz check The lexer skips them, so the formatter may drop them, but the fuzz check counted that as a change beyond whitespace (Kryon CI, seed 1113). The check now uses the lexer's KssIsSpace, and the sheet joins the corpus. --- tests/kss_corpus/form-feed-whitespace.kss | 27 +++++++++++++++++++++++ tests/kss_fuzz.zi | 4 +++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 tests/kss_corpus/form-feed-whitespace.kss diff --git a/tests/kss_corpus/form-feed-whitespace.kss b/tests/kss_corpus/form-feed-whitespace.kss new file mode 100644 index 0000000..9ff91a8 --- /dev/null +++ b/tests/kss_corpus/form-feed-whitespace.kss @@ -0,0 +1,27 @@ +@pack fuzz; +@layer reset, app; +@variant roomy "Label" { + x: #112233; + NavigationBarItem.primary[tone=Accent] { +} +} +Slider[role=Nothing][role=Nothing] { + material: 1 2 3; + border: text; + offset-y: radius; + foreground: -3.5; +} +@import ; +TreeView { + font-size: .; + background: accent; + focus: #abc; + transition: 99999999999999999999; +} +Toggle[tone=Accent] { + background-end: #11223344; + font-size: 0.000001; + foreground: transparent; +} +Text[emphasis=Outline] { +} \ No newline at end of file diff --git a/tests/kss_fuzz.zi b/tests/kss_fuzz.zi index ef328cd..2f64cac 100644 --- a/tests/kss_fuzz.zi +++ b/tests/kss_fuzz.zi @@ -1056,8 +1056,10 @@ WriteOutcome :: (outcome: Outcome) { WriteText(2, " foreign blocks\n") } +// Whitespace as the lexer skips it, including vertical tab and form feed, +// so the formatter may drop exactly these bytes. IsSpace :: (byte: u8) -> bool { - return byte == 32 || byte == 9 || byte == 10 || byte == 13 + return KssIsSpace(byte) } // True when a and b hold the same bytes apart from whitespace.