| ... | @@ -3986,68 +3986,71 @@ test "zig fmt: allow trailing line comments to do manual array formatting" { | ... | @@ -3986,68 +3986,71 @@ test "zig fmt: allow trailing line comments to do manual array formatting" { |
| 3986 | ); | 3986 | ); |
| 3987 | } | 3987 | } |
| 3988 | | 3988 | |
| 3989 | //test "zig fmt: multiline string literals should play nice with array initializers" { | 3989 | test "zig fmt: multiline string literals should play nice with array initializers" { |
| 3990 | // try testCanonical( | 3990 | try testCanonical( |
| 3991 | // \\fn main() void { | 3991 | \\fn main() void { |
| 3992 | // \\ var a = .{.{.{.{.{.{.{.{ | 3992 | \\ var a = .{.{.{.{.{.{.{.{ |
| 3993 | // \\ 0, | 3993 | \\ 0, |
| 3994 | // \\ }}}}}}}}; | 3994 | \\ }}}}}}}}; |
| 3995 | // \\ myFunc(.{ | 3995 | \\ myFunc(.{ |
| 3996 | // \\ "aaaaaaa", "bbbbbb", "ccccc", | 3996 | \\ "aaaaaaa", "bbbbbb", "ccccc", |
| 3997 | // \\ "dddd", ("eee"), ("fff"), | 3997 | \\ "dddd", ("eee"), ("fff"), |
| 3998 | // \\ ("gggg"), | 3998 | \\ ("gggg"), |
| 3999 | // \\ // Line comment | 3999 | \\ // Line comment |
| 4000 | // \\ \\Multiline String Literals can be quite long | 4000 | \\ \\Multiline String Literals can be quite long |
| 4001 | // \\ , | 4001 | \\ , |
| 4002 | // \\ \\Multiline String Literals can be quite long | 4002 | \\ \\Multiline String Literals can be quite long |
| 4003 | // \\ \\Multiline String Literals can be quite long | 4003 | \\ \\Multiline String Literals can be quite long |
| 4004 | // \\ , | 4004 | \\ , |
| 4005 | // \\ \\Multiline String Literals can be quite long | 4005 | \\ \\Multiline String Literals can be quite long |
| 4006 | // \\ \\Multiline String Literals can be quite long | 4006 | \\ \\Multiline String Literals can be quite long |
| 4007 | // \\ \\Multiline String Literals can be quite long | 4007 | \\ \\Multiline String Literals can be quite long |
| 4008 | // \\ \\Multiline String Literals can be quite long | 4008 | \\ \\Multiline String Literals can be quite long |
| 4009 | // \\ , | 4009 | \\ , |
| 4010 | // \\ ( | 4010 | \\ ( |
| 4011 | // \\ \\Multiline String Literals can be quite long | 4011 | \\ \\Multiline String Literals can be quite long |
| 4012 | // \\ ), | 4012 | \\ ), |
| 4013 | // \\ .{ | 4013 | \\ .{ |
| 4014 | // \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 4014 | \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 4015 | // \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 4015 | \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 4016 | // \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 4016 | \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 4017 | // \\ }, | 4017 | \\ }, |
| 4018 | // \\ .{( | 4018 | \\ .{( |
| 4019 | // \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 4019 | \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 4020 | // \\ )}, | 4020 | \\ )}, |
| 4021 | // \\ .{ | 4021 | \\ .{ |
| 4022 | // \\ "xxxxxxx", "xxx", | 4022 | \\ "xxxxxxx", "xxx", |
| 4023 | // \\ ( | 4023 | \\ ( |
| 4024 | // \\ \\ xxx | 4024 | \\ \\ xxx |
| 4025 | // \\ ), | 4025 | \\ ), |
| 4026 | // \\ "xxx", "xxx", | 4026 | \\ "xxx", |
| 4027 | // \\ }, | 4027 | \\ "xxx", |
| 4028 | // \\ .{ "xxxxxxx", "xxx", "xxx", "xxx" }, .{ "xxxxxxx", "xxx", "xxx", "xxx" }, | 4028 | \\ }, |
| 4029 | // \\ "aaaaaaa", "bbbbbb", "ccccc", // - | 4029 | \\ .{ "xxxxxxx", "xxx", "xxx", "xxx" }, |
| 4030 | // \\ "dddd", ("eee"), ("fff"), | 4030 | \\ .{ "xxxxxxx", "xxx", "xxx", "xxx" }, |
| 4031 | // \\ .{ | 4031 | \\ "aaaaaaa", "bbbbbb", "ccccc", // - |
| 4032 | // \\ "xxx", "xxx", | 4032 | \\ "dddd", ("eee"), ("fff"), |
| 4033 | // \\ ( | 4033 | \\ .{ |
| 4034 | // \\ \\ xxx | 4034 | \\ "xxx", "xxx", |
| 4035 | // \\ ), | 4035 | \\ ( |
| 4036 | // \\ "xxxxxxxxxxxxxx", "xxx", | 4036 | \\ \\ xxx |
| 4037 | // \\ }, | 4037 | \\ ), |
| 4038 | // \\ .{ | 4038 | \\ "xxxxxxxxxxxxxx", |
| 4039 | // \\ ( | 4039 | \\ "xxx", |
| 4040 | // \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 4040 | \\ }, |
| 4041 | // \\ ), | 4041 | \\ .{ |
| 4042 | // \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 4042 | \\ ( |
| 4043 | // \\ }, | 4043 | \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 4044 | // \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 4044 | \\ ), |
| 4045 | // \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 4045 | \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 4046 | // \\ }); | 4046 | \\ }, |
| 4047 | // \\} | 4047 | \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 4048 | // \\ | 4048 | \\ \\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 4049 | // ); | 4049 | \\ }); |
| 4050 | //} | 4050 | \\} |
| | 4051 | \\ |
| | 4052 | ); |
| | 4053 | } |
| 4051 | | 4054 | |
| 4052 | test "zig fmt: use of comments and multiline string literals may force the parameters over multiple lines" { | 4055 | test "zig fmt: use of comments and multiline string literals may force the parameters over multiple lines" { |
| 4053 | try testCanonical( | 4056 | try testCanonical( |