Report lacking platform name in app header

This commit is contained in:
caryoscelus 2023-11-28 05:52:43 +00:00
parent 3332503f1d
commit 2fc8e88cca
No known key found for this signature in database
GPG key ID: 254EDDB85B66CB1F
2 changed files with 48 additions and 0 deletions

View file

@ -6009,6 +6009,33 @@ In roc, functions are always written as a lambda, like{}
)
}
#[test]
fn provides_to_missing_platform_in_app_header() {
report_header_problem_as(
indoc!(
r#"
app "broken"
provides [main] to
"#
),
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] to
^
I am expecting platform name, like
to pf
"#
),
)
}
#[test]
fn platform_requires_rigids() {
report_header_problem_as(