summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-03-25 21:32:33 +0100
committerLaurenz <laurmaedje@gmail.com>2021-03-25 21:32:33 +0100
commit76fc4cca62f5b955200b2c62cc85b69eea491ece (patch)
tree5b8492268c996cf23b13e26c7a4356fbd156286d /tests
parente8057a53856dc09594c9e5861f1cd328531616e0 (diff)
Refactor alignments & directions 📐
- Adds lang function - Refactors execution context - Adds StackChild and ParChild enums
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/library/lang.pngbin0 -> 1897 bytes
-rw-r--r--tests/ref/library/page.pngbin8180 -> 7438 bytes
-rw-r--r--tests/ref/library/spacing.pngbin3845 -> 3251 bytes
-rw-r--r--tests/typ/library/lang.typ16
-rw-r--r--tests/typ/library/page.typ7
-rw-r--r--tests/typ/library/spacing.typ7
6 files changed, 16 insertions, 14 deletions
diff --git a/tests/ref/library/lang.png b/tests/ref/library/lang.png
new file mode 100644
index 00000000..98a63b6e
--- /dev/null
+++ b/tests/ref/library/lang.png
Binary files differ
diff --git a/tests/ref/library/page.png b/tests/ref/library/page.png
index 8e5a83ff..9d2a6b95 100644
--- a/tests/ref/library/page.png
+++ b/tests/ref/library/page.png
Binary files differ
diff --git a/tests/ref/library/spacing.png b/tests/ref/library/spacing.png
index c266b9fa..fa403a6d 100644
--- a/tests/ref/library/spacing.png
+++ b/tests/ref/library/spacing.png
Binary files differ
diff --git a/tests/typ/library/lang.typ b/tests/typ/library/lang.typ
new file mode 100644
index 00000000..87d2c154
--- /dev/null
+++ b/tests/typ/library/lang.typ
@@ -0,0 +1,16 @@
+// Test the `lang` function.
+
+---
+Left to right.
+
+#lang("ar")
+Right to left.
+
+#lang(dir: ltr)
+Back again.
+
+---
+// Ref: false
+
+// Error: 12-15 must be horizontal
+#lang(dir: ttb)
diff --git a/tests/typ/library/page.typ b/tests/typ/library/page.typ
index 5123b876..7f9a0d2c 100644
--- a/tests/typ/library/page.typ
+++ b/tests/typ/library/page.typ
@@ -27,9 +27,6 @@
// Error: 7-18 unknown variable
#page(nonexistant)
-// Error: 17-20 aligned axis
-#page(main-dir: ltr)
-
// Flipped predefined paper.
#page("a11", flip: true)[Flipped A11]
@@ -38,10 +35,6 @@
#page(flip: true)
Wide
-// Test changing the layouting directions of pages.
-#page(height: 50pt, main-dir: btt, cross-dir: rtl)
-Right to left!
-
---
// Test a combination of pages with bodies and normal content.
diff --git a/tests/typ/library/spacing.typ b/tests/typ/library/spacing.typ
index 6d50f0dc..bd38631e 100644
--- a/tests/typ/library/spacing.typ
+++ b/tests/typ/library/spacing.typ
@@ -16,10 +16,3 @@ Relative #h(100%) spacing
// Missing spacing.
// Error: 12 missing argument: spacing
Totally #h() ignored
-
-// Swapped axes.
-#page(main-dir: rtl, cross-dir: ttb, height: 80pt)[
- 1 #h(1cm) 2
-
- 3 #v(1cm) 4 #v(-1cm) 5
-]