mirror of
https://github.com/anoma/juvix.git
synced 2024-12-14 17:32:00 +03:00
f61e612c54
If an import statement to a missing module occurs when parsing in a project with no dependencies the error message has the following form: ``` The module Foo does not exist. It should be in /Users/paul/heliax/juvix-2023/tests/negative/NoDependencies/Foo.juvix or in one of the dependencies: ``` This PR changes this error message to the `or in one of the dependencies:` line is omitted from the error message when there are no dependencies in the project. This commit also adds a negative parse error test for missing module.
53 lines
994 B
YAML
53 lines
994 B
YAML
working-directory: ./../../../../tests
|
|
|
|
tests:
|
|
- name: can-parse
|
|
command:
|
|
- juvix
|
|
- dev
|
|
- parse
|
|
args:
|
|
- positive/Axiom.juvix
|
|
stdout:
|
|
contains: "Module"
|
|
exit-status: 0
|
|
|
|
- name: no-pretty-show
|
|
command:
|
|
- juvix
|
|
- dev
|
|
- parse
|
|
- --no-pretty-show
|
|
args:
|
|
- positive/Axiom.juvix
|
|
stdout:
|
|
matches: |
|
|
Module \{.*
|
|
exit-status: 0
|
|
|
|
- name: missing-module-no-dependencies-suggestion-with-no-dependencies
|
|
command:
|
|
- juvix
|
|
- dev
|
|
- parse
|
|
args:
|
|
- negative/NoDependencies/InvalidImport.juvix
|
|
stderr:
|
|
matches:
|
|
regex: |-
|
|
^((?!dependencies).)*$
|
|
options:
|
|
- dot-all
|
|
exit-status: 1
|
|
|
|
- name: missing-module-dependencies-suggestion-with-dependencies
|
|
command:
|
|
- juvix
|
|
- dev
|
|
- parse
|
|
args:
|
|
- negative/Dependencies/InvalidImport.juvix
|
|
stderr:
|
|
contains: dependencies
|
|
exit-status: 1
|