summaryrefslogtreecommitdiff
path: root/tests/typeset.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-06-26 15:47:37 +0200
committerLaurenz <laurmaedje@gmail.com>2021-06-26 15:47:37 +0200
commitd53c933e4d56e6c0484d81814779ddb1597ee032 (patch)
tree493aa2f8397a26b11a1137d2882994686b5ac7de /tests/typeset.rs
parent784018124d13a4cfb050b8bf1fecd283cdc309db (diff)
Add box and block functions
Diffstat (limited to 'tests/typeset.rs')
-rw-r--r--tests/typeset.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs
index 8fc7712a..c5f31e61 100644
--- a/tests/typeset.rs
+++ b/tests/typeset.rs
@@ -224,6 +224,9 @@ fn test_part(
state.page.size = Size::new(Length::pt(120.0), Length::inf());
state.page.margins = Sides::splat(Some(Length::pt(10.0).into()));
+ // Clear cache between tests (for now).
+ cache.layout.clear();
+
let mut pass = typst::typeset(loader, cache, Some(src_path), &src, &scope, state);
if !compare_ref {
@@ -315,7 +318,7 @@ fn register_helpers(scope: &mut Scope, panics: Rc<RefCell<Vec<Panic>>>) {
pub fn args(_: &mut EvalContext, args: &mut FuncArgs) -> Value {
let repr = typst::pretty::pretty(args);
args.items.clear();
- Value::template("args", move |ctx| {
+ Value::template(move |ctx| {
let snapshot = ctx.state.clone();
ctx.set_monospace();
ctx.push_text(&repr);