summaryrefslogtreecommitdiff
path: root/tests/suite/math/op.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-04-13 10:39:45 +0200
committerGitHub <noreply@github.com>2024-04-13 08:39:45 +0000
commit020294fca9a7065d4b9cf4e677f606ebaaa29b00 (patch)
treec0027ad22046e2726c22298461327823d6b88d53 /tests/suite/math/op.typ
parent72dd79210602ecc799726fc096b078afbb47f299 (diff)
Better test runner (#3922)
Diffstat (limited to 'tests/suite/math/op.typ')
-rw-r--r--tests/suite/math/op.typ30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/suite/math/op.typ b/tests/suite/math/op.typ
new file mode 100644
index 00000000..4139a08b
--- /dev/null
+++ b/tests/suite/math/op.typ
@@ -0,0 +1,30 @@
+// Test text operators.
+
+--- math-op-predefined ---
+// Test predefined.
+$ max_(1<=n<=m) n $
+
+--- math-op-call ---
+// With or without parens.
+$ &sin x + log_2 x \
+ = &sin(x) + log_2(x) $
+
+--- math-op-scripts-vs-limits ---
+// Test scripts vs limits.
+#set page(width: auto)
+#set text(font: "New Computer Modern")
+Discuss $lim_(n->oo) 1/n$ now.
+$ lim_(n->infinity) 1/n = 0 $
+
+--- math-op-custom ---
+// Test custom operator.
+$ op("myop", limits: #false)_(x:=1) x \
+ op("myop", limits: #true)_(x:=1) x $
+
+--- math-op-styled ---
+// Test styled operator.
+$ bold(op("bold", limits: #true))_x y $
+
+--- math-non-math-content ---
+// With non-text content
+$ op(#underline[ul]) a $