Skip to content

Commit

Permalink
Test reporting lack of to in app header
Browse files Browse the repository at this point in the history
  • Loading branch information
caryoscelus committed Nov 28, 2023
1 parent d141237 commit 3332503
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions crates/compiler/load/tests/test_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 3332503

Please sign in to comment.