mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-03 06:02:54 +00:00
fix: add spaces around ? in optional record field
This commit is contained in:
parent
9340a67e87
commit
a4410fe052
3 changed files with 39 additions and 1 deletions
|
|
@ -2164,6 +2164,43 @@ mod test_fmt {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn type_definition_add_space_around_optional_record() {
|
||||
expr_formats_to(
|
||||
indoc!(
|
||||
r#"
|
||||
f : { a ?Str }
|
||||
|
||||
f"#
|
||||
),
|
||||
indoc!(
|
||||
r#"
|
||||
f : { a ? Str }
|
||||
|
||||
f"#
|
||||
),
|
||||
);
|
||||
|
||||
expr_formats_to(
|
||||
indoc!(
|
||||
r#"
|
||||
f : {
|
||||
a ?Str,
|
||||
}
|
||||
|
||||
f"#
|
||||
),
|
||||
indoc!(
|
||||
r#"
|
||||
f : {
|
||||
a ? Str,
|
||||
}
|
||||
|
||||
f"#
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn final_comment_in_empty_record_type_definition() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue