diff --git a/parser_test.zig b/parser_test.zig index b121167a06..1d22604bd6 100644 --- a/parser_test.zig +++ b/parser_test.zig @@ -568,6 +568,20 @@ test "zig fmt: tuple struct" { ); } +test "zig fmt: rewrite callconv(.@\"inline\") to the inline keyword" { + try testTransform( + \\fn foo() callconv(.@"inline") void {} + \\const bar: @import("std").builtin.CallingConvention = .@"inline"; + \\fn foo() callconv(bar) void {} + \\ + , + \\inline fn foo() void {} + \\const bar: @import("std").builtin.CallingConvention = .@"inline"; + \\fn foo() callconv(bar) void {} + \\ + ); +} + test "zig fmt: respect line breaks in struct field value declaration" { try testCanonical( \\const Foo = struct {