| author | |
| committer | |
| log | cd325e408e2d23734ba84e412b6f1706cf442434 |
| tree | c1ec318cf6c4dac96d1f47ea0fbb58343e401c84 |
| parent | eda6898c5b253367174172db909ee23013f32733 |
2 files changed, 13 insertions(+), 0 deletions(-)
std/zig/parser_test.zig+11| ... | @@ -1,3 +1,14 @@ | ... | @@ -1,3 +1,14 @@ |
| 1 | test "zig fmt: 2nd arg multiline string" { | ||
| 2 | try testCanonical( | ||
| 3 | \\comptime { | ||
| 4 | \\ cases.addAsm("hello world linux x86_64", | ||
| 5 | \\ \\.text | ||
| 6 | \\ , "Hello, world!\n"); | ||
| 7 | \\} | ||
| 8 | \\ | ||
| 9 | ); | ||
| 10 | } | ||
| 11 | |||
| 1 | test "zig fmt: if condition wraps" { | 12 | test "zig fmt: if condition wraps" { |
| 2 | try testTransform( | 13 | try testTransform( |
| 3 | \\comptime { | 14 | \\comptime { |
std/zig/render.zig+2| ... | @@ -1733,6 +1733,8 @@ fn renderToken(tree: &ast.Tree, stream: var, token_index: ast.TokenIndex, indent | ... | @@ -1733,6 +1733,8 @@ fn renderToken(tree: &ast.Tree, stream: var, token_index: ast.TokenIndex, indent |
| 1733 | } | 1733 | } |
| 1734 | }, | 1734 | }, |
| 1735 | Space.Space, Space.SpaceOrOutdent => { | 1735 | Space.Space, Space.SpaceOrOutdent => { |
| 1736 | if (next_token.id == Token.Id.MultilineStringLiteralLine) | ||
| 1737 | return; | ||
| 1736 | try stream.writeByte(' '); | 1738 | try stream.writeByte(' '); |
| 1737 | return; | 1739 | return; |
| 1738 | }, | 1740 | }, |