Test reporting lack of to in app header

This commit is contained in:
caryoscelus 2023-11-28 02:18:50 +00:00
parent d141237a17
commit 3332503f1d
No known key found for this signature in database
GPG key ID: 254EDDB85B66CB1F

View file

@ -5982,6 +5982,33 @@ In roc, functions are always written as a lambda, like{}
)
}
#[test]
fn provides_missing_to_in_app_header() {
report_header_problem_as(
indoc!(
r#"
app "broken"
provides [main]
"#
),
indoc!(
r#"
WEIRD PROVIDES /code/proj/Main.roc
I am partway through parsing a header, but I got stuck here:
1 app "broken"
2 provides [main]
^
I am expecting the `to` keyword next, like
to pf
"#
),
)
}
#[test]
fn platform_requires_rigids() {
report_header_problem_as(