summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-01-13 16:37:18 +0100
committerLaurenz <laurmaedje@gmail.com>2021-01-13 16:37:18 +0100
commit1cd687b681224a6a190fea5d542b92f147f9abf0 (patch)
tree471c106ceee8384f91aa0304fa21148493663177 /tests/typ
parent274e008e2c775d9c8c888767a6baeaff9e99de9d (diff)
Move escaping tests to integration and extend them 🚚
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/escaping.typ32
-rw-r--r--tests/typ/headings.typ4
2 files changed, 35 insertions, 1 deletions
diff --git a/tests/typ/escaping.typ b/tests/typ/escaping.typ
new file mode 100644
index 00000000..a562dcc0
--- /dev/null
+++ b/tests/typ/escaping.typ
@@ -0,0 +1,32 @@
+// Test basic symbol escapes.
+
+// Escapable
+\\ \/ \[ \] \{ \} \* \_ \# \~ \` \$
+
+// No need to escape.
+( ) = ;
+
+// Unescapable.
+\a \: \; \( \)
+
+// Escaped comments.
+\//
+\/\* \*\/
+\/* \*/
+
+---
+// Test unicode escapes.
+//
+// error: 5:1-5:11 invalid unicode escape sequence
+// error: 8:6-8:6 expected closing brace
+
+\u{1F3D5} == 🏕
+
+// Bad sequence.
+\u{FFFFFF}
+
+// Missing closing brace.
+\u{41*Bold*
+
+// Escaped escape sequence.
+\\u\{ABC\}
diff --git a/tests/typ/headings.typ b/tests/typ/headings.typ
index 88c76ad3..3a115746 100644
--- a/tests/typ/headings.typ
+++ b/tests/typ/headings.typ
@@ -17,12 +17,14 @@
---
// Is no heading.
//
-// error: 4:1-4:6 unexpected invalid token
+// error: 8:1-8:6 unexpected invalid token
\# No heading
Text with # hashtag
+Nr#1
+
#nope
---