From 37e08460377498165f421a522cb4eb1bb4e246b7 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Mon, 31 May 2021 17:19:46 +0200 Subject: Test cases for include and import --- tests/typ/code/include.typ | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/typ/code/include.typ (limited to 'tests/typ/code/include.typ') 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" +} -- cgit v1.2.3