From 2890a156d27c02a101137bf01dc2046597110bd1 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 12 Mar 2022 14:24:24 +0100 Subject: Remove classes and improve naming --- tests/ref/code/repr.png | Bin 29315 -> 28698 bytes tests/typ/style/show.typ | 8 ++++++-- tests/typeset.rs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/ref/code/repr.png b/tests/ref/code/repr.png index be502800..822b096d 100644 Binary files a/tests/ref/code/repr.png and b/tests/ref/code/repr.png differ 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,15 +34,19 @@ 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 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::("left-hand side")?; let rhs = args.expect::("right-hand side")?; if lhs != rhs { -- cgit v1.2.3