diff options
| author | Pg Biel <9021226+PgBiel@users.noreply.github.com> | 2023-05-11 11:36:41 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-11 16:36:41 +0200 |
| commit | 1a6224f566ab76a4456f1245b7bc76b4661572b1 (patch) | |
| tree | 15ac3910c92eca781e5537564d6fa16f72468efd /tests | |
| parent | b5ad2468adafca40448035c80fdabab4b5f75a0f (diff) | |
Default enum number alignment to 'end' (#1042)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/compiler/construct.png | bin | 6320 -> 6230 bytes | |||
| -rw-r--r-- | tests/ref/layout/enum-align.png | bin | 0 -> 8335 bytes | |||
| -rw-r--r-- | tests/ref/layout/enum-numbering.png | bin | 21548 -> 18891 bytes | |||
| -rw-r--r-- | tests/ref/layout/enum.png | bin | 18946 -> 14280 bytes | |||
| -rw-r--r-- | tests/typ/layout/enum-align.typ | 41 | ||||
| -rw-r--r-- | tests/typ/layout/enum.typ | 8 |
6 files changed, 41 insertions, 8 deletions
diff --git a/tests/ref/compiler/construct.png b/tests/ref/compiler/construct.png Binary files differindex 3dac041f..6ce83371 100644 --- a/tests/ref/compiler/construct.png +++ b/tests/ref/compiler/construct.png diff --git a/tests/ref/layout/enum-align.png b/tests/ref/layout/enum-align.png Binary files differnew file mode 100644 index 00000000..5f3f66f9 --- /dev/null +++ b/tests/ref/layout/enum-align.png diff --git a/tests/ref/layout/enum-numbering.png b/tests/ref/layout/enum-numbering.png Binary files differindex 7c39da4f..28755dcb 100644 --- a/tests/ref/layout/enum-numbering.png +++ b/tests/ref/layout/enum-numbering.png diff --git a/tests/ref/layout/enum.png b/tests/ref/layout/enum.png Binary files differindex 94a9ed51..62f1e4ab 100644 --- a/tests/ref/layout/enum.png +++ b/tests/ref/layout/enum.png diff --git a/tests/typ/layout/enum-align.typ b/tests/typ/layout/enum-align.typ new file mode 100644 index 00000000..9d11235c --- /dev/null +++ b/tests/typ/layout/enum-align.typ @@ -0,0 +1,41 @@ +// Test the alignment of enum numbers. + +--- +// Alignment shouldn't affect number +#set align(horizon) + ++ ABCDEF\ GHIJKL\ MNOPQR + + INNER\ INNER\ INNER ++ BACK\ HERE + +--- +// Enum number alignment should be 'end' by default +1. a +10. b +100. c + +#set enum(number-align: start) +1. a +8. b +16. c + +--- +// Number align option should not be affected by the context +#set align(center) +#set enum(number-align: start) + +4. c +8. d +16. e\ f + 2. f\ g + 32. g + 64. h + +--- +// Test valid number align values (horizontal) +#set enum(number-align: start) +#set enum(number-align: end) +#set enum(number-align: left) +#set enum(number-align: right) +// Error: 25-28 alignment must be horizontal +#set enum(number-align: top) diff --git a/tests/typ/layout/enum.typ b/tests/typ/layout/enum.typ index a90e1896..f9fe2648 100644 --- a/tests/typ/layout/enum.typ +++ b/tests/typ/layout/enum.typ @@ -46,11 +46,3 @@ a + 0. [Second], enum.item(5)[Fifth] ) - ---- -// Alignment shouldn't affect number -#set align(horizon) - -+ ABCDEF\ GHIJKL\ MNOPQR - + INNER\ INNER\ INNER -+ BACK\ HERE |
