diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-04-13 10:39:45 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2024-05-17 14:27:59 +0200 |
| commit | e039552f9d7bb49da8dafe7a83b87a08202eb30f (patch) | |
| tree | 264b461722f758d85217da804550620cd74b4f9e /tests/suite/scripting/include.typ | |
| parent | 8e025c9cdfbb0a5dae536aafc27b5e19eeac1810 (diff) | |
Better test runner (#3922)
Diffstat (limited to 'tests/suite/scripting/include.typ')
| -rw-r--r-- | tests/suite/scripting/include.typ | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/suite/scripting/include.typ b/tests/suite/scripting/include.typ new file mode 100644 index 00000000..e4da6d19 --- /dev/null +++ b/tests/suite/scripting/include.typ @@ -0,0 +1,32 @@ +// Test module includes. + +--- include-file --- +#set page(width: 200pt) + += Document + +// Include a file +#include "modules/chap1.typ" + +// Expression as a file name. +#let chap2 = include "modu" + "les/chap" + "2.typ" + +-- _Intermission_ -- +#chap2 + +--- include-file-not-found --- +#{ + // Error: 19-38 file not found (searched at tests/suite/scripting/modules/chap3.typ) + let x = include "modules/chap3.typ" +} + +--- include-no-bindings --- +#include "modules/chap1.typ" + +// The variables of the file should not appear in this scope. +// Error: 2-6 unknown variable: name +#name + +--- include-semicolon-or-linebreak --- +// Error: 18 expected semicolon or line break +#include "hi.typ" Hi |
