aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLachlan Easton <lachlan@lakebythewoods.xyz>2020-08-30 10:34:44 +1000
committerLachlan Easton <lachlan@lakebythewoods.xyz>2020-09-09 21:54:42 +1000
commit601331833a148ff3a1ab5cb4bba8bc63f4850e13 (patch)
tree1f17f82df130c8801c6ac0225ef9ab2e90f961a1 /lib
parent283d441c19d5bafa01a7df24db277a6b08a86c00 (diff)
downloadzig-601331833a148ff3a1ab5cb4bba8bc63f4850e13.tar.gz
zig-601331833a148ff3a1ab5cb4bba8bc63f4850e13.zip
Add passing test. close #5343
Diffstat (limited to 'lib')
-rw-r--r--lib/std/zig/parser_test.zig18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/std/zig/parser_test.zig b/lib/std/zig/parser_test.zig
index 1aec1c3567..6b8734c9d4 100644
--- a/lib/std/zig/parser_test.zig
+++ b/lib/std/zig/parser_test.zig
@@ -3374,6 +3374,24 @@ test "zig fmt: test comments in field access chain" {
);
}
+test "zig fmt: Indent comma correctly after multiline string literals in arg list (trailing comma)" {
+ try testCanonical(
+ \\fn foo() void {
+ \\ z.display_message_dialog(
+ \\ *const [323:0]u8,
+ \\ \\Message Text
+ \\ \\------------
+ \\ \\xxxxxxxxxxxx
+ \\ \\xxxxxxxxxxxx
+ \\ ,
+ \\ g.GtkMessageType.GTK_MESSAGE_WARNING,
+ \\ null,
+ \\ );
+ \\}
+ \\
+ );
+}
+
const std = @import("std");
const mem = std.mem;
const warn = std.debug.warn;