diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-10-18 00:02:38 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-10-18 00:04:12 +0200 |
| commit | c0e972b91a7bf8d22cd24a38fc92a9c6214c8a0c (patch) | |
| tree | 19362eb993f15ef1b9bceeac821852bb6edfe955 /tests | |
| parent | e21822665591dc19766275da1e185215a6b945ef (diff) | |
Reduce dependencies from compiler on library
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typeset.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index 235fcab3..26a0c8b0 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -159,7 +159,7 @@ fn config() -> Config { styles.set(TextNode::SIZE, TextSize(Length::pt(10.0).into())); // Hook up helpers into the global scope. - let mut std = typst::library::new(); + let mut std = typst::library::scope(); std.define("conifer", RgbaColor::new(0x9f, 0xEB, 0x52, 0xFF)); std.define("forest", RgbaColor::new(0x43, 0xA1, 0x27, 0xFF)); std.def_fn("test", move |_, args| { @@ -182,7 +182,12 @@ fn config() -> Config { Ok(Value::None) }); - Config { root: PathBuf::new(), std, styles } + Config { + root: PathBuf::new(), + roles: typst::library::roles(), + std, + styles, + } } /// A world that provides access to the tests environment. |
