parser: update defer test body to match upstream
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3787,9 +3787,17 @@ test "zig fmt: fix single statement if/for/while line breaks" {
|
||||
test "zig fmt: defer" {
|
||||
try testCanonical(
|
||||
\\test "defer" {
|
||||
\\ defer foo();
|
||||
\\ var i: usize = 0;
|
||||
\\ defer i = 1;
|
||||
\\ defer {
|
||||
\\ bar();
|
||||
\\ i += 2;
|
||||
\\ i *= i;
|
||||
\\ }
|
||||
\\
|
||||
\\ errdefer i += 3;
|
||||
\\ errdefer {
|
||||
\\ i += 2;
|
||||
\\ i /= i;
|
||||
\\ }
|
||||
\\}
|
||||
\\
|
||||
|
||||
Reference in New Issue
Block a user