mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
test: update rowspan tests
This commit is contained in:
parent
a783e94daf
commit
f38985bd9b
BIN
tests/ref/grid-rtl-rowspan-counter-mixed-1.png
Normal file
BIN
tests/ref/grid-rtl-rowspan-counter-mixed-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 360 B |
BIN
tests/ref/grid-rtl-rowspan-counter-mixed-2.png
Normal file
BIN
tests/ref/grid-rtl-rowspan-counter-mixed-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 361 B |
Binary file not shown.
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 361 B |
Binary file not shown.
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 360 B |
@ -242,18 +242,18 @@
|
|||||||
columns: (1fr, 1fr),
|
columns: (1fr, 1fr),
|
||||||
inset: 5pt,
|
inset: 5pt,
|
||||||
align: center,
|
align: center,
|
||||||
grid.cell(rowspan: 1, [
|
grid.cell(rowspan: 5, [
|
||||||
a: // should produce 1
|
b: // will produce 2
|
||||||
#test.step()
|
#test.step()
|
||||||
#context test.get().first()
|
#context test.get().first()
|
||||||
]),
|
]),
|
||||||
grid.cell(rowspan: 2, [
|
grid.cell(rowspan: 2, [
|
||||||
b: // should produce 2
|
a: // will produce 1
|
||||||
#test.step()
|
#test.step()
|
||||||
#context test.get().first()
|
#context test.get().first()
|
||||||
]),
|
]),
|
||||||
grid.cell(rowspan: 1, [
|
grid.cell(rowspan: 3, [
|
||||||
c: // should produce 3
|
c: // will produce 3
|
||||||
#test.step()
|
#test.step()
|
||||||
#context test.get().first()
|
#context test.get().first()
|
||||||
]),
|
]),
|
||||||
@ -268,18 +268,68 @@
|
|||||||
inset: 5pt,
|
inset: 5pt,
|
||||||
align: center,
|
align: center,
|
||||||
grid.cell(rowspan: 2, [
|
grid.cell(rowspan: 2, [
|
||||||
a: // should produce 1
|
a: // will produce 1
|
||||||
#test.step()
|
#test.step()
|
||||||
#context test.get().first()
|
#context test.get().first()
|
||||||
]),
|
]),
|
||||||
grid.cell(rowspan: 1, [
|
grid.cell(rowspan: 5, [
|
||||||
b: // should produce 2
|
b: // will produce 2
|
||||||
#test.step()
|
#test.step()
|
||||||
#context test.get().first()
|
#context test.get().first()
|
||||||
]),
|
]),
|
||||||
grid.cell(rowspan: 1, [
|
grid.cell(rowspan: 3, [
|
||||||
d: // should produce 3
|
c: // will produce 3
|
||||||
#test.step()
|
#test.step()
|
||||||
#context test.get().first()
|
#context test.get().first()
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
--- grid-rtl-rowspan-counter-mixed-1 ---
|
||||||
|
// Test interaction between RTL and counters
|
||||||
|
#set text(dir: rtl)
|
||||||
|
#let test = counter("test")
|
||||||
|
#grid(
|
||||||
|
columns: (1fr, 1fr),
|
||||||
|
inset: 5pt,
|
||||||
|
align: center,
|
||||||
|
[
|
||||||
|
a: // will produce 1
|
||||||
|
#test.step()
|
||||||
|
#context test.get().first()
|
||||||
|
],
|
||||||
|
grid.cell(rowspan: 2, [
|
||||||
|
b: // will produce 2
|
||||||
|
#test.step()
|
||||||
|
#context test.get().first()
|
||||||
|
]),
|
||||||
|
[
|
||||||
|
c: // will produce 3
|
||||||
|
#test.step()
|
||||||
|
#context test.get().first()
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
--- grid-rtl-rowspan-counter-mixed-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, [
|
||||||
|
b: // will produce 2
|
||||||
|
#test.step()
|
||||||
|
#context test.get().first()
|
||||||
|
]),
|
||||||
|
[
|
||||||
|
a: // will produce 1
|
||||||
|
#test.step()
|
||||||
|
#context test.get().first()
|
||||||
|
],
|
||||||
|
[
|
||||||
|
c: // will produce 3
|
||||||
|
#test.step()
|
||||||
|
#context test.get().first()
|
||||||
|
]
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user