test: add tests for counter in rowspan grid layout cells

This commit is contained in:
Tobias Schmitz 2025-05-02 20:29:14 +02:00
parent 6be80f3d66
commit a783e94daf
No known key found for this signature in database
4 changed files with 70 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

View File

@ -213,3 +213,73 @@
#context test.get().first()
],
)
--- grid-rtl-rowspan-counter-equal ---
// Test interaction between RTL and counters
#set text(dir: rtl)
#let test = counter("test")
#grid(
columns: (1fr, 1fr),
inset: 5pt,
align: center,
grid.cell(rowspan: 2, [
a: // should produce 1
#test.step()
#context test.get().first()
]),
grid.cell(rowspan: 2, [
b: // should produce 2
#test.step()
#context test.get().first()
]),
)
--- grid-rtl-rowspan-counter-unequal-1 ---
// Test interaction between RTL and counters
#set text(dir: rtl)
#let test = counter("test")
#grid(
columns: (1fr, 1fr),
inset: 5pt,
align: center,
grid.cell(rowspan: 1, [
a: // should produce 1
#test.step()
#context test.get().first()
]),
grid.cell(rowspan: 2, [
b: // should produce 2
#test.step()
#context test.get().first()
]),
grid.cell(rowspan: 1, [
c: // should produce 3
#test.step()
#context test.get().first()
]),
)
--- grid-rtl-rowspan-counter-unequal-2 ---
// Test interaction between RTL and counters
#set text(dir: rtl)
#let test = counter("test")
#grid(
columns: (1fr, 1fr),
inset: 5pt,
align: center,
grid.cell(rowspan: 2, [
a: // should produce 1
#test.step()
#context test.get().first()
]),
grid.cell(rowspan: 1, [
b: // should produce 2
#test.step()
#context test.get().first()
]),
grid.cell(rowspan: 1, [
d: // should produce 3
#test.step()
#context test.get().first()
]),
)