summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-07-19 13:11:54 +0200
committerLaurenz <laurmaedje@gmail.com>2023-07-19 13:11:54 +0200
commitfc90b72355db92d9814de0f0254d354dc7a66573 (patch)
treeb298659fabe035537c7783a83abf8c8e5497c287 /tests/typ
parentfa9e2c62379792c045288d1ab66f68c5a2e18c42 (diff)
Identify state by key only
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/meta/state.typ9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/typ/meta/state.typ b/tests/typ/meta/state.typ
index a7c3d26a..8f460ce1 100644
--- a/tests/typ/meta/state.typ
+++ b/tests/typ/meta/state.typ
@@ -16,6 +16,15 @@ Was: #locate(location => {
}).
---
+// Try same key with different initial value.
+#state("key", 2).display()
+#state("key").update(x => x + 1)
+#state("key", 2).display()
+#state("key", 3).display()
+#state("key").update(x => x + 1)
+#state("key", 2).display()
+
+---
#set page(width: 200pt)
#set text(8pt)