diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-07 15:17:13 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-07 15:17:13 +0100 |
| commit | 25b5bd117529cd04bb789e1988eb3a3db8025a0e (patch) | |
| tree | 2fbb4650903123da047a1f1f11a0abda95286e12 /tests | |
| parent | 6ab7760822ccd24b4ef126d4737d41f1be15fe19 (diff) | |
Fully untyped model
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/text/raw-code.png | bin | 38199 -> 38186 bytes | |||
| -rw-r--r-- | tests/src/tests.rs | 10 | ||||
| -rw-r--r-- | tests/typ/compiler/show-node.typ | 2 | ||||
| -rw-r--r-- | tests/typ/layout/terms.typ | 2 | ||||
| -rw-r--r-- | tests/typ/math/frac.typ | 2 | ||||
| -rw-r--r-- | tests/typ/text/edge.typ | 4 |
6 files changed, 9 insertions, 11 deletions
diff --git a/tests/ref/text/raw-code.png b/tests/ref/text/raw-code.png Binary files differindex 25735e9d..b06b4e4e 100644 --- a/tests/ref/text/raw-code.png +++ b/tests/ref/text/raw-code.png diff --git a/tests/src/tests.rs b/tests/src/tests.rs index 0c2b0490..eae0126d 100644 --- a/tests/src/tests.rs +++ b/tests/src/tests.rs @@ -146,9 +146,8 @@ impl Args { } fn library() -> Library { - /// # Test - /// ## Category - /// test + /// Category: test + /// Display: Test #[func] fn test(args: &mut typst::eval::Args) -> SourceResult<Value> { let lhs = args.expect::<Value>("left-hand side")?; @@ -159,9 +158,8 @@ fn library() -> Library { Ok(Value::None) } - /// # Print - /// ## Category - /// test + /// Category: test + /// Display: Print #[func] fn print(args: &mut typst::eval::Args) -> SourceResult<Value> { print!("> "); diff --git a/tests/typ/compiler/show-node.typ b/tests/typ/compiler/show-node.typ index 7fa55890..6416043c 100644 --- a/tests/typ/compiler/show-node.typ +++ b/tests/typ/compiler/show-node.typ @@ -2,7 +2,7 @@ --- // Override lists. -#show list: it => "(" + it.items.join(", ") + ")" +#show list: it => "(" + it.items.map(item => item.body).join(", ") + ")" - A - B diff --git a/tests/typ/layout/terms.typ b/tests/typ/layout/terms.typ index 6e828094..0be8ddc7 100644 --- a/tests/typ/layout/terms.typ +++ b/tests/typ/layout/terms.typ @@ -35,7 +35,7 @@ #show terms: it => table( columns: 2, inset: 3pt, - ..it.items.map(item => (emph(item.at(0)), item.at(1))).flatten(), + ..it.items.map(item => (emph(item.term), item.description)).flatten(), ) / A: One letter diff --git a/tests/typ/math/frac.typ b/tests/typ/math/frac.typ index db37e28c..2e915de2 100644 --- a/tests/typ/math/frac.typ +++ b/tests/typ/math/frac.typ @@ -17,7 +17,7 @@ $ x = (-b plus.minus sqrt(b^2 - 4a c))/(2a) $ $ binom(circle, square) $ --- -// Error: 8-13 missing argument: lower index +// Error: 8-13 missing argument: lower $ binom(x^2) $ --- diff --git a/tests/typ/text/edge.typ b/tests/typ/text/edge.typ index 802c0ddb..8c4c4a57 100644 --- a/tests/typ/text/edge.typ +++ b/tests/typ/text/edge.typ @@ -17,9 +17,9 @@ #try(1pt + 0.3em, -0.15em) --- -// Error: 21-23 expected length, "ascender", "cap-height", "x-height", "baseline", or "descender", found array +// Error: 21-23 expected "ascender", "cap-height", "x-height", "baseline", "descender", or length, found array #set text(top-edge: ()) --- -// Error: 24-26 expected length, "ascender", "cap-height", "x-height", "baseline", or "descender" +// Error: 24-26 expected "ascender", "cap-height", "x-height", "baseline", "descender", or length #set text(bottom-edge: "") |
