diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-09-17 11:23:35 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2024-09-17 11:25:22 +0200 |
| commit | d4242ff8c1086842a6d7c601d4ffe32feb6f9bc2 (patch) | |
| tree | 0d2d09151f65cee09ccea4fbe0a25eabca057b71 /tests | |
| parent | 4c0f1173abbdba917d2d25921e575e3981ddc15b (diff) | |
Turn unresolved references and citations into warnings
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/cite-missing.png | bin | 0 -> 1881 bytes | |||
| -rw-r--r-- | tests/ref/label-multiple-ignored-warn.png | bin | 0 -> 894 bytes | |||
| -rw-r--r-- | tests/ref/ref-label-complex-missing.png | bin | 0 -> 1291 bytes | |||
| -rw-r--r-- | tests/ref/ref-label-missing.png | bin | 0 -> 423 bytes | |||
| -rw-r--r-- | tests/suite/foundations/label.typ | 14 | ||||
| -rw-r--r-- | tests/suite/model/cite.typ | 11 | ||||
| -rw-r--r-- | tests/suite/model/ref.typ | 8 |
7 files changed, 25 insertions, 8 deletions
diff --git a/tests/ref/cite-missing.png b/tests/ref/cite-missing.png Binary files differnew file mode 100644 index 00000000..beb97f58 --- /dev/null +++ b/tests/ref/cite-missing.png diff --git a/tests/ref/label-multiple-ignored-warn.png b/tests/ref/label-multiple-ignored-warn.png Binary files differnew file mode 100644 index 00000000..f623f3a7 --- /dev/null +++ b/tests/ref/label-multiple-ignored-warn.png diff --git a/tests/ref/ref-label-complex-missing.png b/tests/ref/ref-label-complex-missing.png Binary files differnew file mode 100644 index 00000000..933721a2 --- /dev/null +++ b/tests/ref/ref-label-complex-missing.png diff --git a/tests/ref/ref-label-missing.png b/tests/ref/ref-label-missing.png Binary files differnew file mode 100644 index 00000000..22596df7 --- /dev/null +++ b/tests/ref/ref-label-missing.png diff --git a/tests/suite/foundations/label.typ b/tests/suite/foundations/label.typ index af6d2380..f662695a 100644 --- a/tests/suite/foundations/label.typ +++ b/tests/suite/foundations/label.typ @@ -72,16 +72,16 @@ _Visible_ // Hint: 1-8 only the last label is used, the rest are ignored = Hello <a> <b> -// Warning: 12-19 content labelled multiple times -// Hint: 12-19 only the last label is used, the rest are ignored -#let f = [#block()<c>] +// Warning: 12-26 content labelled multiple times +// Hint: 12-26 only the last label is used, the rest are ignored +#let f = [#metadata(none)<c>] #f<d> -// Warning: 6-13 content labelled multiple times -// Hint: 6-13 only the last label is used, the rest are ignored -#[#[#block()]<e>]<f> +// Warning: 6-20 content labelled multiple times +// Hint: 6-20 only the last label is used, the rest are ignored +#[#[#metadata(none)]<e>]<f> -// Error: 1-3 label `<a>` does not exist in the document +// Warning: 1-3 label `<a>` does not exist in the document @a --- label-unattached-warn --- diff --git a/tests/suite/model/cite.typ b/tests/suite/model/cite.typ index ffbd3b52..34f91f4c 100644 --- a/tests/suite/model/cite.typ +++ b/tests/suite/model/cite.typ @@ -49,6 +49,17 @@ A @netwok @arrgh @quark, B. #show bibliography: none #bibliography("/assets/bib/works.bib") +--- cite-missing --- +// Warning: 2-15 key `peter` does not exist in the bibliography +// Warning: 31-37 label `<extra>` does not exist in the document +#cite(<peter>) @netwok @arrgh @extra + +// Warning: 2-20 key `>?&` does not exist in the bibliography +#cite(label(">?&")) + +#show bibliography: none +#bibliography("/assets/bib/works.bib") + --- issue-785-cite-locate --- // Test citation in other introspection. #set page(width: 180pt) diff --git a/tests/suite/model/ref.typ b/tests/suite/model/ref.typ index cc6d6bf1..c8ff8067 100644 --- a/tests/suite/model/ref.typ +++ b/tests/suite/model/ref.typ @@ -10,9 +10,15 @@ See @setup. As seen in @intro, we proceed. --- ref-label-missing --- -// Error: 1-5 label `<foo>` does not exist in the document +// Warning: 1-5 label `<foo>` does not exist in the document @foo +--- ref-label-complex-missing --- +#set page(width: auto) + +// Warning: 2-28 label `label("is;/"bad%//#")` does not exist in the document +#ref(label("is;\"bad%//#")) + --- ref-label-duplicate --- = First <foo> = Second <foo> |
