summaryrefslogtreecommitdiff
path: root/tests/typ/compiler/include.typ
blob: 586e869bb4d337a8a9f2584bda8befe1c7229c72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Test module includes.

---
#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

---
#{
  // Error: 19-38 file not found (searched at typ/compiler/modules/chap3.typ)
  let x = include "modules/chap3.typ"
}

---
#include "modules/chap1.typ"

// The variables of the file should not appear in this scope.
// Error: 2-6 unknown variable: name
#name

---
// Error: 18 expected semicolon or line break
#include "hi.typ" Hi