summaryrefslogtreecommitdiff
path: root/tests/typ/code/include.typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/code/include.typ')
-rw-r--r--tests/typ/code/include.typ23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/typ/code/include.typ b/tests/typ/code/include.typ
new file mode 100644
index 00000000..9fd028f9
--- /dev/null
+++ b/tests/typ/code/include.typ
@@ -0,0 +1,23 @@
+// Test include statements.
+
+---
+= Document
+
+// Include a file
+#include "importable/chap1.typ"
+
+// The variables of the file should not appear in this scope.
+// Error: 1-6 unknown variable
+#name
+
+// Expression as a file name.
+#let chap2 = include "import" + "able/chap" + "2.typ"
+
+_ -- Intermission -- _
+#chap2
+
+{
+ // Expressions, code mode.
+ // Error: 21-43 file not found
+ let x = include "importable/chap3.typ"
+}