| ... | @@ -6666,6 +6666,24 @@ test "zig fmt: doc comments on fn parameters" { | ... | @@ -6666,6 +6666,24 @@ test "zig fmt: doc comments on fn parameters" { |
| 6666 | ); | 6666 | ); |
| 6667 | } | 6667 | } |
| 6668 | | 6668 | |
| | 6669 | test "zig fmt: canonicalize stray backslashes in identifiers" { |
| | 6670 | try testTransform( |
| | 6671 | \\const @"\x" = undefined; |
| | 6672 | \\const @"\x3" = undefined; |
| | 6673 | \\const @"\x3\x39" = undefined; |
| | 6674 | \\const @"\u{" = undefined; |
| | 6675 | \\const @"\?" = undefined; |
| | 6676 | \\ |
| | 6677 | , |
| | 6678 | \\const @"\\x" = undefined; |
| | 6679 | \\const @"\\x3" = undefined; |
| | 6680 | \\const @"\\x39" = undefined; |
| | 6681 | \\const @"\\u{" = undefined; |
| | 6682 | \\const @"\\?" = undefined; |
| | 6683 | \\ |
| | 6684 | ); |
| | 6685 | } |
| | 6686 | |
| 6669 | test "recovery: top level" { | 6687 | test "recovery: top level" { |
| 6670 | try testError( | 6688 | try testError( |
| 6671 | \\test "" {inline} | 6689 | \\test "" {inline} |