summaryrefslogtreecommitdiff
path: root/tests/suite/introspection
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-06-09 15:23:56 +0200
committerGitHub <noreply@github.com>2024-06-09 13:23:56 +0000
commitf91cad7d7829556e24d219e55db7da56a966523f (patch)
treeadce387eb0008198852dd243693512237d3b5f2a /tests/suite/introspection
parentcc3e9c86022c5ae5a82938b0b65e3d2dca93b1ed (diff)
Pure location assignment (#4352)
Diffstat (limited to 'tests/suite/introspection')
-rw-r--r--tests/suite/introspection/counter.typ28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/suite/introspection/counter.typ b/tests/suite/introspection/counter.typ
index 8a5315f9..c0b17921 100644
--- a/tests/suite/introspection/counter.typ
+++ b/tests/suite/introspection/counter.typ
@@ -76,3 +76,31 @@ At Beta, it was #context {
// Hint: 2-28 try wrapping this in a `context` expression
// Hint: 2-28 the `context` expression should wrap everything that depends on this function
#counter("key").at(<label>)
+
+--- issue-2480-counter-reset ---
+#let q = counter("question")
+#let step-show = q.step() + q.display("1")
+#let g = grid(step-show, step-show, gutter: 2pt)
+
+#g
+#pagebreak()
+#step-show
+#q.update(10)
+#g
+
+--- issue-2480-counter-reset-2 ---
+#set block(spacing: 3pt)
+#let c = counter("c")
+#let foo() = context {
+ c.step()
+ c.display("1")
+ str(c.get().first())
+}
+
+#foo()
+#block(foo())
+#foo()
+#foo()
+#block(foo())
+#block(foo())
+#foo()