summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/full/coma.typ (renamed from tests/typ/example-coma.typ)2
-rw-r--r--tests/typ/lang/arrays.typ (renamed from tests/typ/arrays.typ)0
-rw-r--r--tests/typ/lang/basics.typ (renamed from tests/typ/basics.typ)8
-rw-r--r--tests/typ/lang/comments.typ (renamed from tests/typ/comments.typ)0
-rw-r--r--tests/typ/lang/dictionaries.typ (renamed from tests/typ/dictionaries.typ)0
-rw-r--r--tests/typ/lang/empty.typ (renamed from tests/typ/empty.typ)0
-rw-r--r--tests/typ/lang/escaping.typ (renamed from tests/typ/escaping.typ)0
-rw-r--r--tests/typ/lang/headings.typ (renamed from tests/typ/headings.typ)6
-rw-r--r--tests/typ/library/font.typ (renamed from tests/typ/func-font.typ)34
-rw-r--r--tests/typ/library/hv.typ (renamed from tests/typ/func-hv.typ)2
-rw-r--r--tests/typ/library/image.typ (renamed from tests/typ/func-image.typ)17
-rw-r--r--tests/typ/library/page.typ (renamed from tests/typ/func-page.typ)30
-rw-r--r--tests/typ/library/pagebreak.typ (renamed from tests/typ/func-pagebreak.typ)2
-rw-r--r--tests/typ/library/rgb.typ (renamed from tests/typ/func-rgb.typ)2
14 files changed, 34 insertions, 69 deletions
diff --git a/tests/typ/example-coma.typ b/tests/typ/full/coma.typ
index 5374af1f..b7863fce 100644
--- a/tests/typ/example-coma.typ
+++ b/tests/typ/full/coma.typ
@@ -1,5 +1,3 @@
-// Test integration of syntax, library and layouting.
-
[page width: 450pt, height: 300pt, margins: 1cm]
[box][
diff --git a/tests/typ/arrays.typ b/tests/typ/lang/arrays.typ
index 0b8fb866..0b8fb866 100644
--- a/tests/typ/arrays.typ
+++ b/tests/typ/lang/arrays.typ
diff --git a/tests/typ/basics.typ b/tests/typ/lang/basics.typ
index b7630e7f..9220e376 100644
--- a/tests/typ/basics.typ
+++ b/tests/typ/lang/basics.typ
@@ -1,17 +1,9 @@
-// Test text, emph and strong.
-
Hello 🌏!
_Emph_ and *strong*!
----
-// Test non-breaking space.
-
The non-breaking~space does not work.
----
-// Test backslash.
-
// Directly after word.
Line\ Break
diff --git a/tests/typ/comments.typ b/tests/typ/lang/comments.typ
index 56906d0c..56906d0c 100644
--- a/tests/typ/comments.typ
+++ b/tests/typ/lang/comments.typ
diff --git a/tests/typ/dictionaries.typ b/tests/typ/lang/dictionaries.typ
index c729b92c..c729b92c 100644
--- a/tests/typ/dictionaries.typ
+++ b/tests/typ/lang/dictionaries.typ
diff --git a/tests/typ/empty.typ b/tests/typ/lang/empty.typ
index e69de29b..e69de29b 100644
--- a/tests/typ/empty.typ
+++ b/tests/typ/lang/empty.typ
diff --git a/tests/typ/escaping.typ b/tests/typ/lang/escaping.typ
index cb663612..cb663612 100644
--- a/tests/typ/escaping.typ
+++ b/tests/typ/lang/escaping.typ
diff --git a/tests/typ/headings.typ b/tests/typ/lang/headings.typ
index 0f364a9b..f62f6534 100644
--- a/tests/typ/headings.typ
+++ b/tests/typ/lang/headings.typ
@@ -1,4 +1,4 @@
-// Number of hashtags.
+// Test different numbers of hashtags.
# One
### Three
@@ -8,7 +8,7 @@
####### Seven
---
-// Heading vs. no heading.
+// Test heading vs. no heading.
/**/ # Heading
{[## Heading]}
@@ -24,7 +24,7 @@ Nr#1
#nope
---
-// Heading continues over linebreak.
+// Heading continuation over linebreak.
# This {
"works"
diff --git a/tests/typ/func-font.typ b/tests/typ/library/font.typ
index 8199ecb4..beaddd4e 100644
--- a/tests/typ/func-font.typ
+++ b/tests/typ/library/font.typ
@@ -19,8 +19,22 @@
// Set stretch (not available, matching closest).
[font stretch: ultra-condensed][Condensed]
+// Error: 1:7-1:12 unexpected argument
+[font false]
+
+// Error: 3:14-3:18 expected font style, found font weight
+// Error: 2:28-2:34 expected font weight, found string
+// Error: 1:43-1:44 expected font family or array of font families, found integer
+[font style: bold, weight: "thin", serif: 0]
+
+// Warning: 1:15-1:19 must be between 100 and 900
+[font weight: 2700]
+
+// Error: 1:7-1:27 unexpected argument
+[font something: "invalid"]
+
---
-// Test font fallback.
+// Test font fallback and class definitions.
// Source Sans Pro + Segoe UI Emoji.
Emoji: 🏀
@@ -40,21 +54,3 @@ Emoji: 🏀
[font sans-serif: "Noto Emoji"]
[font sans-serif: ("Archivo", sans-serif)]
New sans-serif. 🚀
-
----
-// Test error cases.
-// Ref: false
-
-// Error: 1:7-1:12 unexpected argument
-[font false]
-
-// Error: 3:14-3:18 expected font style, found font weight
-// Error: 2:28-2:34 expected font weight, found string
-// Error: 1:43-1:44 expected font family or array of font families, found integer
-[font style: bold, weight: "thin", serif: 0]
-
-// Warning: 1:15-1:19 must be between 100 and 900
-[font weight: 2700]
-
-// Error: 1:7-1:27 unexpected argument
-[font something: "invalid"]
diff --git a/tests/typ/func-hv.typ b/tests/typ/library/hv.typ
index b32a645c..36a6d242 100644
--- a/tests/typ/func-hv.typ
+++ b/tests/typ/library/hv.typ
@@ -1,5 +1,3 @@
-// Test the `h` and `v` functions.
-
// Ends paragraphs.
Tightly [v -5pt] packed
diff --git a/tests/typ/func-image.typ b/tests/typ/library/image.typ
index 1f94a66f..2e7b1eb5 100644
--- a/tests/typ/func-image.typ
+++ b/tests/typ/library/image.typ
@@ -7,6 +7,12 @@
// Load an RGB JPEG image.
[image "res/tiger.jpg"]
+// Error: 1:8-1:29 failed to load image
+[image "path/does/not/exist"]
+
+// Error: 1:8-1:29 failed to load image
+[image "typ/image-error.typ"]
+
---
// Test configuring the size and fitting behaviour of images.
@@ -31,14 +37,3 @@
[align bottom, right][
[image "res/tiger.jpg", width: 60pt]
]
-
----
-// Test error cases.
-//
-// Ref: false
-
-// Error: 1:8-1:29 failed to load image
-[image "path/does/not/exist"]
-
-// Error: 1:8-1:29 failed to load image
-[image "typ/image-error.typ"]
diff --git a/tests/typ/func-page.typ b/tests/typ/library/page.typ
index 49671e14..9eeddc93 100644
--- a/tests/typ/func-page.typ
+++ b/tests/typ/library/page.typ
@@ -21,8 +21,11 @@
// Ensure that specific margins override general margins.
[page margins: 0pt, left: 20pt][Overriden]
----
-// Test flipping.
+// Error: 1:7-1:18 unknown variable
+[page nonexistant]
+
+// Error: 1:17-1:20 aligned axis
+[page main-dir: ltr]
// Flipped predefined paper.
[page "a11", flip: true][Flipped A11]
@@ -32,6 +35,11 @@
[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.
@@ -44,21 +52,3 @@ Fourth
[page][]
Sixth
[page][Seventh and last]
-
----
-// Test changing the layouting directions of pages.
-
-[page height: 50pt, main-dir: btt, cross-dir: rtl]
-
-Right to left!
-
----
-// Test error cases.
-//
-// Ref: false
-
-// Error: 1:7-1:18 unknown variable
-[page nonexistant]
-
-// Error: 1:17-1:20 aligned axis
-[page main-dir: ltr]
diff --git a/tests/typ/func-pagebreak.typ b/tests/typ/library/pagebreak.typ
index 603e11d4..2f539ce0 100644
--- a/tests/typ/func-pagebreak.typ
+++ b/tests/typ/library/pagebreak.typ
@@ -1,5 +1,3 @@
-// Test trailing pagebreak.
-
First of two
[pagebreak]
[page height: 40pt]
diff --git a/tests/typ/func-rgb.typ b/tests/typ/library/rgb.typ
index d29c2940..66d63d0d 100644
--- a/tests/typ/func-rgb.typ
+++ b/tests/typ/library/rgb.typ
@@ -1,5 +1,3 @@
-// Test the `rgb` function.
-
// Check the output.
[rgb 0.0, 0.3, 0.7]