| ... | ... | @@ -8,6 +8,18 @@ test "zig fmt: change use to usingnamespace" { |
| 8 | 8 | ); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | test "zig fmt: async function" { |
| 12 | try testCanonical( |
| 13 | \\pub const Server = struct { |
| 14 | \\ handleRequestFn: async fn (*Server, *const std.net.Address, File) void, |
| 15 | \\}; |
| 16 | \\test "hi" { |
| 17 | \\ var ptr = @ptrCast(async fn (i32) void, other); |
| 18 | \\} |
| 19 | \\ |
| 20 | ); |
| 21 | } |
| 22 | |
| 11 | 23 | test "zig fmt: whitespace fixes" { |
| 12 | 24 | try testTransform("test \"\" {\r\n\tconst hi = x;\r\n}\n// zig fmt: off\ntest \"\"{\r\n\tconst a = b;}\r\n", |
| 13 | 25 | \\test "" { |