From 2b48992a2f86a5c88fccaab6879774eb9266c24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Tue, 10 Feb 2026 18:23:57 +0000 Subject: [PATCH] parser: port test "whitespace fixes" Co-Authored-By: Claude Opus 4.6 (1M context) --- parser_test.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/parser_test.zig b/parser_test.zig index 1d22604bd6..7f5591208f 100644 --- a/parser_test.zig +++ b/parser_test.zig @@ -1505,6 +1505,18 @@ test "zig fmt: block in slice expression" { ); } +test "zig fmt: whitespace fixes" { + try testTransform("test \"\" {\r\n\tconst hi = x;\r\n}\n// zig fmt: off\ntest \"\"{\r\n\tconst a = b;}\r\n", + \\test "" { + \\ const hi = x; + \\} + \\// zig fmt: off + \\test ""{ + \\ const a = b;} + \\ + ); +} + test "zig fmt: tagged union with enum values" { try testCanonical( \\const MultipleChoice2 = union(enum(u32)) {