diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-30 18:04:08 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-30 18:49:19 +0200 |
| commit | 1ee1d078e2480ddd08d40915bc7a74a8352acff0 (patch) | |
| tree | 1e7ff367278a19fead3e404cf06d65bfb80a6cd9 /tests/typ/code/import.typ | |
| parent | 42a27b48df427edf8dbb624c51551a90ecf2e7ea (diff) | |
Fatal errors
- Makes errors fatal, so that a phase is only reached when all previous phases were error-free
- Parsing still recovers and can produce multiple errors
- Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import)
- The single error that could occur during execution is removed for now
- Removes Value::Error variant
Diffstat (limited to 'tests/typ/code/import.typ')
| -rw-r--r-- | tests/typ/code/import.typ | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/tests/typ/code/import.typ b/tests/typ/code/import.typ index e1af8ceb..93d4d168 100644 --- a/tests/typ/code/import.typ +++ b/tests/typ/code/import.typ @@ -11,8 +11,7 @@ #let value = [foo] // Import multiple things. -// Error: 9-10 expected expression, found comma -#import ,fn, value from "target.typ" +#import fn, value from "target.typ" #fn[Like and Subscribe!] #value @@ -24,10 +23,6 @@ #test(b, 1) -// This should not exist yet -// Error: 1-3 unknown variable -#d - // A wildcard import. #import * from "target.typ" @@ -45,30 +40,35 @@ #import a, c, from "target.typ" --- -// Test bad imports. -// Ref: false - // Error: 19-21 file not found #import name from "" +--- // Error: 16-27 file not found #import * from "lib/0.2.1" +--- // Some non-text stuff. // Error: 16-37 file is not valid utf-8 #import * from "../../res/rhino.png" +--- // Unresolved import. // Error: 9-21 unresolved import #import non_existing from "target.typ" -// Cyclic import. -// Error: 16-41 cyclic import -#import * from "./importable/cycle1.typ" +--- +// Cyclic import of this very file. +// Error: 16-30 cyclic import +#import * from "./import.typ" --- -// Test bad syntax. +// Cyclic import in other file. +#import * from "./importable/cycle1.typ" +This is never reached. + +--- // Error: 8 expected import items // Error: 8 expected keyword `from` #import @@ -100,7 +100,6 @@ #from "target.typ" // Should output `target`. -// Error: 1:16-2:2 file not found // Error: 2:2 expected semicolon or line break #import * from "target.typ "target |
