mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
parent
d12568d8e4
commit
df3b7cb1b4
2 changed files with 41 additions and 1 deletions
|
@ -5615,6 +5615,37 @@ mod test_fmt {
|
|||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn leading_comments_preserved() {
|
||||
module_formats_same(indoc!(
|
||||
r#"
|
||||
# hello world
|
||||
interface Foo
|
||||
exposes []
|
||||
imports []
|
||||
"#
|
||||
));
|
||||
|
||||
module_formats_same(indoc!(
|
||||
r#"
|
||||
# hello world
|
||||
app "test" packages {} imports [] provides [] to "./platform"
|
||||
"#
|
||||
));
|
||||
|
||||
module_formats_same(indoc!(
|
||||
r#"
|
||||
# hello world
|
||||
platform "hello-world"
|
||||
requires {} { main : Str }
|
||||
exposes []
|
||||
packages {}
|
||||
imports []
|
||||
provides [mainForHost]
|
||||
"#
|
||||
));
|
||||
}
|
||||
|
||||
// this is a parse error atm
|
||||
// #[test]
|
||||
// fn multiline_apply() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue