Skip to content

Commit

Permalink
Add missing provides error message test
Browse files Browse the repository at this point in the history
  • Loading branch information
KilianVounckx committed Jun 27, 2023
1 parent b84cc9a commit 3bc8a33
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions crates/reporting/tests/test_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5938,6 +5938,40 @@ In roc, functions are always written as a lambda, like{}
)
}

#[test]
fn missing_provides_in_app_header() {
report_header_problem_as(
indoc!(
r#"
app "broken"
packages {
pf: "https://github.com/roc-lang/basic-cli/releases/download/0.3.2/tE4xS_zLdmmxmHwHih9kHWQ7fsXtJr7W7h3425-eZFk.tar.br",
}
imports [
pf.Stdout,
]
main =
Stdout.line "answer"
"#
),
indoc!(
r#"
── WEIRD PROVIDES ──────────────────────────────────────── /code/proj/Main.roc ─
I am partway through parsing a header, but I got stuck here:
7│ ]
^
I am expecting the `provides` keyword next, like
provides [Animal, default, tame]
"#
),
)
}

#[test]
fn platform_requires_rigids() {
report_header_problem_as(
Expand Down

0 comments on commit 3bc8a33

Please sign in to comment.