From 606183cd307cfc414a04727b31d0f69f8f51583a Mon Sep 17 00:00:00 2001 From: Eric Biedert Date: Mon, 26 May 2025 22:16:34 +0200 Subject: [PATCH] Add tests --- tests/ref/block-multiple-pages-empty.png | Bin 0 -> 263 bytes .../ref/issue-2914-block-fill-skip-nested.png | Bin 0 -> 499 bytes tests/ref/issue-2914-block-height-cut-off.png | Bin 0 -> 409 bytes .../issue-6125-block-place-width-limited.png | Bin 0 -> 147 bytes tests/ref/issue-6304-block-skip-label.png | Bin 0 -> 311 bytes tests/suite/layout/container.typ | 37 ++++++++++++++++++ 6 files changed, 37 insertions(+) create mode 100644 tests/ref/block-multiple-pages-empty.png create mode 100644 tests/ref/issue-2914-block-fill-skip-nested.png create mode 100644 tests/ref/issue-2914-block-height-cut-off.png create mode 100644 tests/ref/issue-6125-block-place-width-limited.png create mode 100644 tests/ref/issue-6304-block-skip-label.png diff --git a/tests/ref/block-multiple-pages-empty.png b/tests/ref/block-multiple-pages-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..44f9df91b9c6609035ee75626bc3522123a5ff39 GIT binary patch literal 263 zcmeAS@N?(olHy`uVBq!ia0vp^6+m3c0VEi%2k%-9q|SM|IEGZ*dV58eiz!j!$j98Y z`~(xpt(|85i6zYs7+v-pP;(XFsp7DIC6#h;RmUPvgE!H46gb+BOV3D27ynn>D1Z1s zg<2Oo4-d~D`5mI!5BAz$I^Y;I{lGfmFnunI8?x%mjDKFu+^aqR%frI^kyqvxD;&TC zk}aW$$q7i{!Tb+pTlaW9sJ?ji7T1ka(@azfGB4igkUG9~GuyU@Aq?)V1#j(HKD;fd f_!I*-uCi_a@r$3io$9{wgM8@e>gTe~DWM4f7WsC7 literal 0 HcmV?d00001 diff --git a/tests/ref/issue-2914-block-fill-skip-nested.png b/tests/ref/issue-2914-block-fill-skip-nested.png new file mode 100644 index 0000000000000000000000000000000000000000..d7b1aa7d7a8e5b0cc1489a689620ba3a2ddf0af1 GIT binary patch literal 499 zcmVr#%T5PjRq;`hnn_B*8NJEQ7))AnAYzA{&3Ibw2Wvd~kH zr%HjAPl%rqASDtXBoiSfQ;?`OU2J{W{0kHp6eB1R9U@zuw?uY{7%4Dz%k4^ll`2V9 zT%Wmf$LLLloIr4bmX?+_Ha5Y*!PV8(XlQ80#>U#(+J1h1E-o(k`1r`k$Zc(H@$vCK zK0cF^lWA#bNJvQP>gs%ae3X=waBy(-_4S~jp!@s#%gf7+jg26U;vkOVwbt~u*YpT_ z+d!!7f4S^Hr|f{b>;M1&mp08c0002WNkl(u}N literal 0 HcmV?d00001 diff --git a/tests/ref/issue-2914-block-height-cut-off.png b/tests/ref/issue-2914-block-height-cut-off.png new file mode 100644 index 0000000000000000000000000000000000000000..1c4d57d2a8b6fd64ae14a87bb3220a0ad2896837 GIT binary patch literal 409 zcmV;K0cQS*P)qdEvc+c@*rNL^q)ncl~G+AgQK1g)Q>Pdc+G+Jq8uFFq|pAsM?5+5WJAtn(W zA`~Mi3ltZ9*!)wFs5V_}Ibw1+U~qcU^+|t}K5BeGaDrT)xpT+pO@^Fy%k4yViCdkw z7%4DHfR!pqReIC*QjVowqrNg%WoNR`Q;(-gftGvK_+zWcHePK{iJ*Pg`xhuKKWu(% zyV@HsHXk)U0002Wk3?nw005~;L_t(|+U?m#3c~;l1<}Y(@4ffx6sNcQpDZUZWMTYm zn0J8zEd)X-07x0MPAA)) zBHS|TdxCJMZFblT!rh*KI zo<5Lr@^o~*`}eye6OpSLSMlE>>2qlT*s$Kr#}&Yx0P>Z6hr)OKIrHPEZZmh)%8 z`}4vTUtb2x&+mN1%*MvHkLSb*D$=Z-7@>% zQigf`?b-9VC1Bvkx`fahK+cbS4;^*B%L^TNcmCoT!2_L5Gv~5w2o}wq!`b!VYW4NL rt(U(hMvG6LstdLZXdg1DY5pKN>+&lT+y6_7K_TMl>gTe~DWM4fMtgu} literal 0 HcmV?d00001 diff --git a/tests/suite/layout/container.typ b/tests/suite/layout/container.typ index f15ddfe4a..cec1df6a8 100644 --- a/tests/suite/layout/container.typ +++ b/tests/suite/layout/container.typ @@ -64,6 +64,12 @@ First! is the sun. ] +--- block-multiple-pages-empty --- +#set page(height: 60pt) +A +#block(height: 30pt) +B + --- block-box-fill --- #set page(height: 100pt) #let words = lorem(18).split() @@ -287,6 +293,37 @@ Paragraph #block(width: 100%, fill: red, box("a box")) #block(width: 100%, fill: red, [#box("a box") #box()]) +--- issue-2914-block-height-cut-off --- +// Ensure that breaking a block doesn't shrink its height. +#set page(height: 65pt) +#set block(fill: aqua, width: 25pt, height: 25pt, inset: 5pt) + +#block[A] +#block[B] + +--- issue-2914-block-fill-skip-nested --- +// Ensure that fill and stroke are skipped for an empty frame with a nested block. +#set page(height: 50pt) +A +#block(fill: aqua, stroke: blue, inset: 5pt, width: 100%, block[B]) + +--- issue-6304-block-skip-label --- +// Ensure that labeling is skipped for an empty orphan frame. +#set page(height: 60pt) +A +#block(sticky: true)[B] +#block[C]