From e1f29d6cb9437a4afb2e4fc4ee10a5b8717ab9fa Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 22 Feb 2022 14:31:09 +0100 Subject: Rework the core context --- tests/typ/style/show.typ | 7 ++++--- tests/typeset.rs | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/typ/style/show.typ b/tests/typ/style/show.typ index 1055f9c7..734ef931 100644 --- a/tests/typ/style/show.typ +++ b/tests/typ/style/show.typ @@ -44,9 +44,10 @@ A [= Heading] C = Heading --- -// Error: 1-29 show rule is recursive -#show strong(x) as strong(x) -*Hi* +// Ref: false +// // Error: 1-29 show rule is recursive +// #show strong(x) as strong(x) +// *Hi* --- // Error: 2-19 set, show and wrap are only allowed directly in markup diff --git a/tests/typeset.rs b/tests/typeset.rs index e0530f9b..1b45a975 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -17,7 +17,7 @@ use typst::loading::FsLoader; use typst::parse::Scanner; use typst::source::SourceFile; use typst::syntax::Span; -use typst::{Context, Vm}; +use typst::Context; const TYP_DIR: &str = "./typ"; const REF_DIR: &str = "./ref"; @@ -267,8 +267,7 @@ fn test_part( ok &= test_reparse(ctx.sources.get(id).src(), i, rng); - let mut vm = Vm::new(ctx); - let (mut frames, mut errors) = match vm.typeset(id) { + let (mut frames, mut errors) = match ctx.typeset(id) { Ok(frames) => (frames, vec![]), Err(errors) => (vec![], *errors), }; -- cgit v1.2.3