diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-03-12 14:24:24 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-03-12 14:24:24 +0100 |
| commit | 2890a156d27c02a101137bf01dc2046597110bd1 (patch) | |
| tree | c6bdeb48242c0fbd5b5e13120ca3c8f502d41b75 /tests | |
| parent | 5ac7eb3860ebd3247f6486c227e816894cb8fd91 (diff) | |
Remove classes and improve naming
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/code/repr.png | bin | 29315 -> 28698 bytes | |||
| -rw-r--r-- | tests/typ/style/show.typ | 8 | ||||
| -rw-r--r-- | tests/typeset.rs | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/tests/ref/code/repr.png b/tests/ref/code/repr.png Binary files differindex be502800..822b096d 100644 --- a/tests/ref/code/repr.png +++ b/tests/ref/code/repr.png diff --git a/tests/typ/style/show.typ b/tests/typ/style/show.typ index e442e4d5..2e003b0a 100644 --- a/tests/typ/style/show.typ +++ b/tests/typ/style/show.typ @@ -34,16 +34,20 @@ Another text. A [= Heading] C --- -// Error: 1-22 unexpected argument +// Error: 14-22 unexpected argument #show heading() as [] = Heading --- -// Error: 1-28 expected content, found string +// Error: 14-28 expected content, found string #show heading(_, _) as "hi" = Heading --- +// Error: 7-12 this function cannot be customized with show +#show upper() as {} + +--- // Ref: false // // Error: 1-29 show rule is recursive // #show strong(x) as strong(x) diff --git a/tests/typeset.rs b/tests/typeset.rs index 388d4516..dfc8bff9 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -73,7 +73,7 @@ fn main() { let mut std = typst::library::new(); std.def_const("conifer", RgbaColor::new(0x9f, 0xEB, 0x52, 0xFF)); std.def_const("forest", RgbaColor::new(0x43, 0xA1, 0x27, 0xFF)); - std.def_func("test", move |_, args| { + std.def_fn("test", move |_, args| { let lhs = args.expect::<Value>("left-hand side")?; let rhs = args.expect::<Value>("right-hand side")?; if lhs != rhs { |
