Skip to content

Commit

Permalink
Add typecheck stdin smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
vrom911 committed May 2, 2023
1 parent 972f97e commit b791cf0
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions tests/smoke/Commands/typecheck.smoke.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
working-directory: ./../../../tests/
tests:
- name: flag-help-shows-juvix-file-for-autocompletion
command:
- juvix
command:
- juvix
- typecheck
- --help
stdout:
contains:
"Usage: juvix typecheck JUVIX_FILE"
contains: 'Usage: juvix typecheck JUVIX_FILE'
exit-status: 0

- name: check-simple-file
Expand All @@ -16,7 +15,7 @@ tests:
- typecheck
args:
- positive/Internal/Simple.juvix
stdout:
stdout:
equals: "Well done! It type checks\n"
exit-status: 0

Expand All @@ -27,7 +26,7 @@ tests:
- typecheck
args:
- positive/Internal/Simple.juvix
stdout: ""
stdout: ''
exit-status: 0

- name: get-typechecking-error
Expand All @@ -37,8 +36,8 @@ tests:
- typecheck
args:
- negative/Internal/MultiWrongType.juvix
stdout: ""
stderr:
stdout: ''
stderr:
matches: |-
(.+)\/([^\/]+)\.juvix\:[0-9]*\:[0-9]*\-[0-9]*\: error
exit-status: 1
Expand All @@ -52,3 +51,15 @@ tests:
stdout:
equals: "Well done! It type checks\n"
exit-status: 0

- name: typecheck-stdin
command:
- juvix
- --stdin
- typecheck
args:
- positive/Internal/Simple.juvix
stdin: 'module OtherModule; open import Stdlib.Prelude; main : Nat; main := 5;'
stderr:
contains: 'positive/Internal/Simple.juvix'
exit-status: 1

0 comments on commit b791cf0

Please sign in to comment.