From 3332503f1d04faa57239fbe487bc16c0c09ed165 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Tue, 28 Nov 2023 02:18:50 +0000 Subject: [PATCH] Test reporting lack of `to` in app header --- crates/compiler/load/tests/test_reporting.rs | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/crates/compiler/load/tests/test_reporting.rs b/crates/compiler/load/tests/test_reporting.rs index 4ff92306428..d9adf18f3dc 100644 --- a/crates/compiler/load/tests/test_reporting.rs +++ b/crates/compiler/load/tests/test_reporting.rs @@ -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(