diff options
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/escaping.typ | 32 | ||||
| -rw-r--r-- | tests/typ/headings.typ | 4 |
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 --- |
