Skip to content

Commit daf4789

Browse files
committed
Add a test for #2087
1 parent 0a59654 commit daf4789

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/source/macros.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ fn main() {
2121
kaas!(/* comments */ a /* post macro */, b /* another */);
2222

2323
trailingcomma!( a , b , c , );
24+
// Preserve trailing comma only when necessary.
25+
ok!(file.seek(
26+
SeekFrom::Start(
27+
table.map(|table| fixture.offset(table)).unwrap_or(0),
28+
)
29+
));
2430

2531
noexpr!( i am not an expression, OK? );
2632

tests/target/macros.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ fn main() {
3333
);
3434

3535
trailingcomma!(a, b, c,);
36+
// Preserve trailing comma only when necessary.
37+
ok!(file.seek(SeekFrom::Start(
38+
table.map(|table| fixture.offset(table)).unwrap_or(0),
39+
)));
3640

3741
noexpr!( i am not an expression, OK? );
3842

0 commit comments

Comments
 (0)