mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Format apply funcs with try suffix correctly
This commit is contained in:
parent
90db3b2db0
commit
eb9d1bcf09
2 changed files with 75 additions and 3 deletions
|
@ -5602,6 +5602,30 @@ mod test_fmt {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pnc_apply_with_try_suffix_after_fn() {
|
||||
expr_formats_to_with_flags(
|
||||
indoc!("some_fn?(arg1, arg2)"),
|
||||
indoc!("some_fn(arg1, arg2)?"),
|
||||
MigrationFlags {
|
||||
snakify: true,
|
||||
parens_and_commas: true,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ws_apply_with_try_suffix_after_fn() {
|
||||
expr_formats_to_with_flags(
|
||||
indoc!("some_fn? arg1 arg2"),
|
||||
indoc!("some_fn(arg1, arg2)?"),
|
||||
MigrationFlags {
|
||||
snakify: true,
|
||||
parens_and_commas: true,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn func_call_trailing_multiline_lambda() {
|
||||
// New syntax
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue