Correct formatting for multiline string in arrays
This commit is contained in:
committed by
Andrew Kelley
parent
7bfae39c5c
commit
4e1f3a9ba3
@@ -2209,6 +2209,25 @@ test "zig fmt: inline asm parameter alignment" {
|
||||
);
|
||||
}
|
||||
|
||||
test "zig fmt: multiline string in array" {
|
||||
try testCanonical(
|
||||
\\const Foo = [][]const u8{
|
||||
\\ \\aaa
|
||||
\\,
|
||||
\\ \\bbb
|
||||
\\};
|
||||
\\
|
||||
\\fn bar() void {
|
||||
\\ const Foo = [][]const u8{
|
||||
\\ \\aaa
|
||||
\\ ,
|
||||
\\ \\bbb
|
||||
\\ };
|
||||
\\}
|
||||
\\
|
||||
);
|
||||
}
|
||||
|
||||
const std = @import("std");
|
||||
const mem = std.mem;
|
||||
const warn = std.debug.warn;
|
||||
|
||||
Reference in New Issue
Block a user