diff options
| author | +merlan #flirora <uruwi@protonmail.com> | 2024-06-22 04:59:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-22 08:59:52 +0000 |
| commit | 781eea632f68c478c0a96495f7f4822ba6f7873d (patch) | |
| tree | 1866cda18d077cc36b76f9a661491cb4bea8f638 /tests | |
| parent | 3d3489fbaef7524655f5c911e0bf6dec7394f90e (diff) | |
Add message when trying to access a field that is not set (#4399)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/suite/foundations/content.typ | 14 | ||||
| -rw-r--r-- | tests/suite/styling/show.typ | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/tests/suite/foundations/content.typ b/tests/suite/foundations/content.typ index afecc124..31ef1c54 100644 --- a/tests/suite/foundations/content.typ +++ b/tests/suite/foundations/content.typ @@ -13,7 +13,7 @@ - C --- content-field-missing --- -// Error: 25-28 content does not contain field "fun" +// Error: 25-28 heading does not have field "fun" #show heading: it => it.fun = A @@ -118,3 +118,15 @@ } = Hello, world! <my-label> + +--- content-fields-unset --- +// Error: 10-15 field "block" in raw is not known at this point +#raw("").block + +--- content-fields-unset-no-default --- +// Error: 2-21 field "block" in raw is not known at this point and no default was specified +#raw("").at("block") + +--- content-try-to-access-internal-field --- +// Error: 9-15 hide does not have field "hidden" +#hide[].hidden diff --git a/tests/suite/styling/show.typ b/tests/suite/styling/show.typ index aa121bff..05f545c6 100644 --- a/tests/suite/styling/show.typ +++ b/tests/suite/styling/show.typ @@ -78,7 +78,7 @@ Another text. = Heading --- show-unknown-field --- -// Error: 25-29 content does not contain field "page" +// Error: 25-29 heading does not have field "page" #show heading: it => it.page = Heading |
