parser: port test "whitespace fixes"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-02-10 18:23:57 +00:00
parent 854f1157c4
commit 2b48992a2f

View File

@@ -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)) {