From 83c463f6a7ac1d5aeac5afd649a8531652b3ad38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Tue, 10 Feb 2026 15:06:28 +0000 Subject: [PATCH] parser: port test "sentinel-terminated slice type" Co-Authored-By: Claude Opus 4.6 (1M context) --- parser_test.zig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/parser_test.zig b/parser_test.zig index 6c0d6966d0..bc032a5788 100644 --- a/parser_test.zig +++ b/parser_test.zig @@ -1817,6 +1817,15 @@ test "zig fmt: c pointer type" { ); } +test "zig fmt: sentinel-terminated slice type" { + try testCanonical( + \\pub fn toSlice(self: Buffer) [:0]u8 { + \\ return self.list.toSlice()[0..self.len()]; + \\} + \\ + ); +} + test "zig fmt: top-level tuple function call type" { try testCanonical( \\foo()