mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Test [pagebreak] 🗞
This commit is contained in:
parent
81e80ecfba
commit
0adbfe894a
@ -1,7 +1,10 @@
|
|||||||
# Tests
|
# Tests
|
||||||
|
|
||||||
- `typ`: Input files
|
- `typ`: Input files.
|
||||||
- `ref`: Reference images which the output is compared with to determine
|
- `ref`: Reference images which the output is compared with to determine whether
|
||||||
whether a test passed or failed
|
a test passed or failed. To keep things small, please run
|
||||||
- `res`: Resource files used by tests
|
`oxipng -o max tests/ref/<img>` when creating or updating reference
|
||||||
- `out`: PNG and PDF files produced by tests
|
images (note that `<img>` can be `*` to optimize all images).
|
||||||
|
- `res`: Resource files used by tests.
|
||||||
|
- `out`: PNG and PDF files produced by tests.
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
tests/ref/pagebreak.png
Normal file
BIN
tests/ref/pagebreak.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@ -1,11 +1,11 @@
|
|||||||
// Test error cases of the `image` function.
|
// Test error cases of the `image` function.
|
||||||
|
|
||||||
// compare-ref: false
|
|
||||||
// error: 8:9-8:30 failed to load image
|
|
||||||
// error: 11:9-11:30 failed to load image
|
|
||||||
|
|
||||||
// File does not exist.
|
// File does not exist.
|
||||||
[image: "path/does/not/exist"]
|
[image: "path/does/not/exist"]
|
||||||
|
|
||||||
// File exists, but is no image.
|
// File exists, but is no image.
|
||||||
[image: "typ/image-error.typ"]
|
[image: "typ/image-error.typ"]
|
||||||
|
|
||||||
|
// compare-ref: false
|
||||||
|
// error: 4:9-4:30 failed to load image
|
||||||
|
// error: 7:9-7:30 failed to load image
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
[page][Second]
|
[page][Second]
|
||||||
[pagebreak]
|
[pagebreak]
|
||||||
Fourth
|
Fourth
|
||||||
[page][Fifth]
|
[page][]
|
||||||
Sixth
|
Sixth
|
||||||
[page][Seventh and last]
|
[page][Seventh and last]
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// Test error cases of the `page` function.
|
// Test error cases of the `page` function.
|
||||||
|
|
||||||
// compare-ref: false
|
|
||||||
// error: 8:8-8:19 invalid paper
|
|
||||||
// error: 11:17-11:20 aligned axis
|
|
||||||
|
|
||||||
// Invalid paper.
|
// Invalid paper.
|
||||||
[page: nonexistant]
|
[page: nonexistant]
|
||||||
|
|
||||||
// Aligned axes.
|
// Aligned axes.
|
||||||
[page: main-dir=ltr]
|
[page: main-dir=ltr]
|
||||||
|
|
||||||
|
// compare-ref: false
|
||||||
|
// error: 4:8-4:19 invalid paper
|
||||||
|
// error: 7:17-7:20 aligned axis
|
||||||
|
5
tests/typ/pagebreak.typ
Normal file
5
tests/typ/pagebreak.typ
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// Test trailing pagebreak.
|
||||||
|
|
||||||
|
First of two
|
||||||
|
[pagebreak]
|
||||||
|
[page: height=40pt]
|
Loading…
x
Reference in New Issue
Block a user