diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/meta/ref.png | bin | 0 -> 11693 bytes | |||
| -rw-r--r-- | tests/typ/compiler/set.typ | 4 | ||||
| -rw-r--r-- | tests/typ/meta/ref.typ | 21 |
3 files changed, 23 insertions, 2 deletions
diff --git a/tests/ref/meta/ref.png b/tests/ref/meta/ref.png Binary files differnew file mode 100644 index 00000000..13e4db33 --- /dev/null +++ b/tests/ref/meta/ref.png diff --git a/tests/typ/compiler/set.typ b/tests/typ/compiler/set.typ index 36a42745..a4482e6d 100644 --- a/tests/typ/compiler/set.typ +++ b/tests/typ/compiler/set.typ @@ -51,8 +51,8 @@ Hello *#x* --- // Test conditional set. #show ref: it => { - set text(red) if it.target == "unknown" - it + set text(red) if it.label == <unknown> + "@" + str(it.label) } @hello from the @unknown diff --git a/tests/typ/meta/ref.typ b/tests/typ/meta/ref.typ new file mode 100644 index 00000000..85750712 --- /dev/null +++ b/tests/typ/meta/ref.typ @@ -0,0 +1,21 @@ +// Test references. + +--- +#set heading(numbering: "1.") + += Introduction <intro> +See @setup. + +== Setup <setup> +As seen in @intro, we proceed. + +--- +// Error: 1-5 label does not exist in the document +@foo + +--- += First <foo> += Second <foo> + +// Error: 1-5 label occurs multiple times in the document +@foo |
