commit 6b38ea04a88deb96c362513f415d41cf286f15ed (tree) parent cdede19bc6c79d3b61b12b756b29cadcab881a59 Author: Motiejus Jakštys <motiejus.jakstys@chronosphere.io> Date: Tue, 10 Feb 2026 17:15:55 +0000 parser: port test "sentinel-terminated array type" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Diffstat:
| M | parser_test.zig | | | 9 | +++++++++ |
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/parser_test.zig b/parser_test.zig @@ -1817,6 +1817,15 @@ test "zig fmt: c pointer type" { ); } +test "zig fmt: sentinel-terminated array type" { + try testCanonical( + \\pub fn cStrToPrefixedFileW(s: [*:0]const u8) ![PATH_MAX_WIDE:0]u16 { + \\ return sliceToPrefixedFileW(mem.toSliceConst(u8, s)); + \\} + \\ + ); +} + test "zig fmt: sentinel-terminated slice type" { try testCanonical( \\pub fn toSlice(self: Buffer) [:0]u8 {