diff options
| author | +merlan #flirora <uruwi@protonmail.com> | 2024-06-11 05:08:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-11 09:08:30 +0000 |
| commit | 20475ab0bf4f28511064195b71890a3cf5d188a1 (patch) | |
| tree | 6d6e4e69f306e6df5779b5ab38d031a700e27784 /tests | |
| parent | 7fa86eed0eca9b529d71d4006f389a753467e54a (diff) | |
Add hint when string is used in place of label (#4330)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/suite/layout/length.typ | 3 | ||||
| -rw-r--r-- | tests/suite/model/cite.typ | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/suite/layout/length.typ b/tests/suite/layout/length.typ index 68755619..34a4b939 100644 --- a/tests/suite/layout/length.typ +++ b/tests/suite/layout/length.typ @@ -45,7 +45,8 @@ } --- length-unit-hint --- -// Error: 1:17-1:19 expected length, found integer: a length needs a unit - did you mean 12pt? +// Error: 17-19 expected length, found integer +// Hint: 17-19 a length needs a unit - did you mean 12pt? #set text(size: 12) --- length-ignore-em-pt-hint --- diff --git a/tests/suite/model/cite.typ b/tests/suite/model/cite.typ index 24d6ad04..750db38b 100644 --- a/tests/suite/model/cite.typ +++ b/tests/suite/model/cite.typ @@ -114,3 +114,15 @@ B #cite(<netwok>) #cite(<arrgh>). @mcintosh_anxiety #show bibliography: none #bibliography("/assets/bib/works.bib", style: "chicago-author-date") + +--- cite-type-error-hint --- +// Test hint for cast error from str to label +// Error: 7-15 expected label, found string +// Hint: 7-15 use `<netwok>` or `label("netwok")` to create a label +#cite("netwok") + +--- cite-type-error-hint-invalid-literal --- +// Test hint for cast error from str to label +// Error: 7-17 expected label, found string +// Hint: 7-17 use `label("%@&#*!\\")` to create a label +#cite("%@&#*!\\") |
