initial proper subfooter unit tests

This commit is contained in:
PgBiel 2025-06-13 03:01:48 -03:00
parent 8f434146d8
commit c346fb8589
14 changed files with 141 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

View File

@ -22,6 +22,7 @@
[*Mode*], [2025], [*Mode*], [2025],
table.cell(colspan: 2)[*Totals*], table.cell(colspan: 2)[*Totals*],
), ),
// TODO: Why does it overflow here?
table.header( table.header(
level: 2, level: 2,
table.cell(colspan: 2)[*United States*], table.cell(colspan: 2)[*United States*],
@ -39,3 +40,143 @@
table.cell(colspan: 2)[*Data Inc.*], table.cell(colspan: 2)[*Data Inc.*],
), ),
) )
--- grid-subfooters-basic ---
#grid(
[a],
grid.footer(level: 2, [b]),
grid.footer([c]),
)
--- grid-subfooters-basic-non-consecutive ---
#grid(
[x],
grid.footer(level: 2, [a]),
[y],
grid.footer([b]),
)
--- grid-subfooters-basic-replace ---
#grid(
[x],
grid.footer(level: 2, [a]),
[y],
grid.footer(level: 2, [b]),
[z],
grid.footer([c]),
)
--- grid-subfooters-basic-with-header ---
#grid(
grid.header([a]),
[b],
grid.footer(level: 2, [c]),
grid.footer([d]),
)
--- grid-subfooters-basic-non-consecutive-with-header ---
#grid(
grid.header([a]),
[x],
grid.footer(level: 2, [b]),
[y],
grid.footer([f])
)
--- grid-subfooters-repeat ---
#set page(height: 8em)
#grid(
..([a],) * 10,
grid.footer(level: 2, [b]),
grid.footer([c]),
)
--- grid-subfooters-repeat-non-consecutive ---
#set page(height: 8em)
#grid(
..([y],) * 10,
grid.footer(level: 2, [b]),
[x],
grid.footer([a]),
)
--- grid-subfooters-repeat-with-header ---
#set page(height: 8em)
#grid(
grid.header([a]),
..([b],) * 10,
grid.footer(level: 2, [c]),
[m],
grid.footer([f])
)
--- grid-subfooters-repeat-gutter ---
// Gutter above the footer is also repeated
#set page(height: 8em)
#grid(
inset: (top: 0.5pt),
stroke: (top: 1pt),
gutter: (1pt,) * 9 + (6pt, 1pt),
..([a],) * 10,
grid.footer(level: 2, [b]),
grid.footer([c]),
)
--- grid-subfooters-repeat-replace ---
#set page(height: 8em)
#grid(
..([x],) * 10,
grid.footer(level: 2, [a]),
..([y],) * 10,
grid.footer(level: 2, [b]),
[z],
grid.footer([c]),
)
--- grid-subfooters-repeat-replace-multiple-levels ---
// TODO: This is overflowing
#set page(height: 8em)
#grid(
..([x],) * 6,
grid.footer(level: 2, [a]),
..([y],) * 10,
grid.footer(level: 3, [b]),
grid.footer(level: 2, [c]),
[z],
grid.footer([d]),
)
--- grid-subfooters-repeat-replace-gutter ---
#set page(height: 8em)
#grid(
gutter: 3pt,
..([x],) * 3,
grid.footer(level: 2, [a]),
..([y],) * 8,
grid.footer(level: 2, [b]),
[z],
grid.footer([c]),
)
--- grid-subfooters-repeat-replace-widow ---
#set page(height: 8em)
#grid(
..([x],) * 14,
grid.footer(level: 2, [a]),
..([y],) * 8,
grid.footer(level: 2, [b]),
[z],
grid.footer([c]),
)
--- grid-subfooters-repeat-replace-double-widow ---
#set page(height: 8em)
#grid(
..([x],) * 12,
grid.footer(level: 3, [a]),
grid.footer(level: 2, [b]),
..([y],) * 11,
grid.footer(level: 2, [c]),
[z],
grid.footer([d]),
)