mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Fix formatting of applies in backpassing
This commit is contained in:
parent
0a58d6e60e
commit
02b51bcd37
2 changed files with 63 additions and 1 deletions
|
@ -2714,6 +2714,46 @@ mod test_fmt {
|
|||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backpassing_simple() {
|
||||
expr_formats_same(indoc!(
|
||||
r#"
|
||||
getChar = \ctx ->
|
||||
x <- Task.await (getCharScope scope)
|
||||
42
|
||||
|
||||
42
|
||||
"#
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backpassing_apply_tag() {
|
||||
expr_formats_same(indoc!(
|
||||
r#"
|
||||
getChar = \ctx ->
|
||||
(T val newScope) <- Task.await (getCharScope scope)
|
||||
42
|
||||
|
||||
42
|
||||
"#
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backpassing_body_on_newline() {
|
||||
expr_formats_same(indoc!(
|
||||
r#"
|
||||
getChar = \ctx ->
|
||||
x <-
|
||||
Task.await (getCharScope scope)
|
||||
42
|
||||
|
||||
42
|
||||
"#
|
||||
));
|
||||
}
|
||||
|
||||
// this is a parse error atm
|
||||
// #[test]
|
||||
// fn multiline_apply() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue