Skip to content

Commit

Permalink
Added test for forgetting .gr extension
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-snezhko committed Feb 25, 2024
1 parent 29beccf commit 60caf81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compiler/test/suites/includes.re
Expand Up @@ -183,10 +183,15 @@ describe("includes", ({test, testSkip}) => {
"./broken.gr\", line 4, characters 5-15",
);
assertCompileError(
"include_extension",
"include_extension1",
"from \"list.gr\" include List",
"Missing file for module list.gr: did you forget to remove the .gr extension?",
);
assertCompileError(
"include_extension2",
"from \"brokenRelativeInclude\" include BrokenRelativeInclude",
"Missing file for module ./data: did you forget to add the .gr extension?",
);
assertRun(
"reprovide_values",
"from \"reprovideContents\" include ReprovideContents; use ReprovideContents.{ type Type, module Mod }; print(A); print(Mod.val)",
Expand Down
3 changes: 3 additions & 0 deletions compiler/test/test-libs/brokenRelativeInclude.gr
@@ -0,0 +1,3 @@
module BrokenRelativeInclude

from "./data" include Data

0 comments on commit 60caf81

Please sign in to comment.