Add test for multiline tuple with comments

This commit is contained in:
Joshua Warner 2022-11-15 19:50:57 -05:00
parent d4bf946327
commit 36f0e9d4f5
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
4 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,11 @@
(
# before 1
1,
# after 1
# before 2
2,
# after 2
# before 3
3,
# after 3
)

View file

@ -0,0 +1,61 @@
Tuple(
[
@20-21 SpaceBefore(
SpaceAfter(
Num(
"1",
),
[
Newline,
LineComment(
"after 1",
),
],
),
[
Newline,
LineComment(
"before 1",
),
],
),
@59-60 SpaceBefore(
SpaceAfter(
Num(
"2",
),
[
Newline,
LineComment(
"after 2",
),
],
),
[
Newline,
LineComment(
"before 2",
),
],
),
@98-99 SpaceBefore(
SpaceAfter(
Num(
"3",
),
[
Newline,
LineComment(
" after 3",
),
],
),
[
Newline,
LineComment(
"before 3",
),
],
),
],
)

View file

@ -0,0 +1,13 @@
(
#before 1
1
#after 1
,
#before 2
2
#after 2
,
#before 3
3
# after 3
)

View file

@ -167,6 +167,7 @@ mod test_parse {
pass/equals_with_spaces.expr,
pass/equals.expr,
pass/expect_fx.module,
pass/multiline_tuple_with_comments.expr,
pass/expect.expr,
pass/float_with_underscores.expr,
pass/full_app_header_trailing_commas.header,