summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/math-class-chars.pngbin1331 -> 1346 bytes
-rw-r--r--tests/ref/shorthand-minus.pngbin0 -> 175 bytes
-rw-r--r--tests/ref/shorthands-math.pngbin1832 -> 1921 bytes
-rw-r--r--tests/suite/math/class.typ2
-rw-r--r--tests/suite/syntax/shorthand.typ7
5 files changed, 7 insertions, 2 deletions
diff --git a/tests/ref/math-class-chars.png b/tests/ref/math-class-chars.png
index a4f7d29b..6bcaaf40 100644
--- a/tests/ref/math-class-chars.png
+++ b/tests/ref/math-class-chars.png
Binary files differ
diff --git a/tests/ref/shorthand-minus.png b/tests/ref/shorthand-minus.png
new file mode 100644
index 00000000..e4249865
--- /dev/null
+++ b/tests/ref/shorthand-minus.png
Binary files differ
diff --git a/tests/ref/shorthands-math.png b/tests/ref/shorthands-math.png
index 0514fa62..ab6b7333 100644
--- a/tests/ref/shorthands-math.png
+++ b/tests/ref/shorthands-math.png
Binary files differ
diff --git a/tests/suite/math/class.typ b/tests/suite/math/class.typ
index 7aad0446..d25071db 100644
--- a/tests/suite/math/class.typ
+++ b/tests/suite/math/class.typ
@@ -8,7 +8,7 @@ $ a class("normal", +) b \
{ x class("fence", \;) x > 0} \
a class("large", \/) b \
a class("punctuation", :) b \
- a class("relation", ~) b \
+ a class("relation", !) b \
a + class("unary", times) b \
class("vary", :) a class("vary", :) b $
diff --git a/tests/suite/syntax/shorthand.typ b/tests/suite/syntax/shorthand.typ
index 81aa6b7b..7d1782b9 100644
--- a/tests/suite/syntax/shorthand.typ
+++ b/tests/suite/syntax/shorthand.typ
@@ -19,12 +19,17 @@ a~b
#set text(font: "Roboto")
A... vs #"A..."
+--- shorthand-minus ---
+// Make sure shorthand is applied only before a digit.
+-a -1
+
--- shorthands-math ---
-// Check all math shorthands
+// Check all math shorthands.
$...$\
$-$\
$'$\
$*$\
+$~$\
$!=$\
$:=$\
$::=$\