diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-05-29 15:45:57 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-05-31 22:33:40 +0200 |
| commit | e023bf2ac9f5796355d9485afc16781196bf212b (patch) | |
| tree | 26d4487de0c4e2d0f69182483301de867cb5fa34 /tests/typeset.rs | |
| parent | 9f77f09aacd1fb0fd6138a6d16ed2755f6bfae3f (diff) | |
Module loading system
Detects cyclic imports and loads each module only once per compilation.
Diffstat (limited to 'tests/typeset.rs')
| -rw-r--r-- | tests/typeset.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index faf76f7e..3f9bbd1d 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -162,7 +162,7 @@ fn test( } } else { let (part_ok, compare_here, part_frames) = - test_part(loader, cache, part, i, compare_ref, lines); + test_part(loader, cache, src_path, part, i, compare_ref, lines); ok &= part_ok; compare_ever |= compare_here; frames.extend(part_frames); @@ -203,6 +203,7 @@ fn test( fn test_part( loader: &mut FsLoader, cache: &mut Cache, + path: &Path, src: &str, i: usize, compare_ref: bool, @@ -223,7 +224,7 @@ fn test_part( state.page.size = Size::new(Length::pt(120.0), Length::raw(f64::INFINITY)); state.page.margins = Sides::splat(Some(Length::pt(10.0).into())); - let mut pass = typst::typeset(loader, cache, &src, &scope, state); + let mut pass = typst::typeset(loader, cache, path, &src, &scope, state); if !compare_ref { pass.output.clear(); } |
