typst/tests/typ/code/include.typ
Laurenz 1ee1d078e2 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
2021-07-30 18:49:19 +02:00

27 lines
433 B
Typst

// Test include statements.
---
= Document
// Include a file
#include "importable/chap1.typ"
// Expression as a file name.
#let chap2 = include "import" + "able/chap" + "2.typ"
-- _Intermission_ --
#chap2
---
{
// Error: 21-43 file not found
let x = include "importable/chap3.typ"
}
---
#include "importable/chap1.typ"
// The variables of the file should not appear in this scope.
// Error: 1-6 unknown variable
#name