diff options
| author | Leedehai <18319900+Leedehai@users.noreply.github.com> | 2024-01-30 04:30:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-30 09:30:57 +0000 |
| commit | a3e1c70e9e20b0438c233223eeead4f06a371c2c (patch) | |
| tree | 8d02123d2b6f8e75fe32832b4f6ca8b38d3a6f37 /tests/typ/bugs | |
| parent | a6037293367db42c7242cab9dec14662402ef061 (diff) | |
Fix an error of uncastable dict input (#3247)
Diffstat (limited to 'tests/typ/bugs')
| -rw-r--r-- | tests/typ/bugs/3232-dict-wrong-keys.typ | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/typ/bugs/3232-dict-wrong-keys.typ b/tests/typ/bugs/3232-dict-wrong-keys.typ new file mode 100644 index 00000000..61d9e8b8 --- /dev/null +++ b/tests/typ/bugs/3232-dict-wrong-keys.typ @@ -0,0 +1,23 @@ +// Issue #3232: Confusing "expected relative length or dictionary, found dictionary" +// https://github.com/typst/typst/issues/3232 +// Ref: false + +--- +// Error: 16-58 unexpected keys "unexpected" and "unexpected-too" +#block(outset: (unexpected: 0.5em, unexpected-too: 0.2em), [Hi]) + +--- +// Error: 14-56 unexpected keys "unexpected" and "unexpected-too" +#box(radius: (unexpected: 0.5em, unexpected-too: 0.5em), [Hi]) + +--- +// Error: 16-49 unexpected key "unexpected", valid keys are "left", "top", "right", "bottom", "x", "y", and "rest" +#block(outset: (unexpected: 0.2em, right: 0.5em), [Hi]) // The 1st key is unexpected + +--- +// Error: 14-50 unexpected key "unexpected", valid keys are "top-left", "top-right", "bottom-right", "bottom-left", "left", "top", "right", "bottom", and "rest" +#box(radius: (top-left: 0.5em, unexpected: 0.5em), [Hi]) // The 2nd key is unexpected + +--- +#block(outset: (:), [Hi]) // Ok +#box(radius: (:), [Hi]) // Ok |
