summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-07-29 13:21:25 +0200
committerLaurenz <laurmaedje@gmail.com>2021-07-29 13:28:19 +0200
commit2c6127dea611944abb09a0d38375ad7cf9baced0 (patch)
tree6572d169d4ce26edc38a880860ebae2f49639fb8 /tests
parent7d15dc634b3be1b6e284bb6b2450e3736d3e6e8d (diff)
Refactor state
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/text/par.pngbin4337 -> 3632 bytes
-rw-r--r--tests/typ/text/par.typ7
-rw-r--r--tests/typeset.rs5
3 files changed, 4 insertions, 8 deletions
diff --git a/tests/ref/text/par.png b/tests/ref/text/par.png
index 41742f20..c3758738 100644
--- a/tests/ref/text/par.png
+++ b/tests/ref/text/par.png
Binary files differ
diff --git a/tests/typ/text/par.typ b/tests/typ/text/par.typ
index 8aa1147d..0c776c70 100644
--- a/tests/typ/text/par.typ
+++ b/tests/typ/text/par.typ
@@ -1,12 +1,7 @@
// Test configuring paragraph properties.
---
-// FIXME: Word spacing doesn't work due to new shaping process.
-#par!(spacing: 10pt, leading: 25%, word-spacing: 1pt)
+#par!(spacing: 10pt, leading: 25%)
But, soft! what light through yonder window breaks? It is the east, and Juliet
is the sun.
-
----
-// Test that it finishes an existing paragraph.
-Hello #par!(word-spacing: 0pt) t h e r e !
diff --git a/tests/typeset.rs b/tests/typeset.rs
index 3e83fcb5..78577098 100644
--- a/tests/typeset.rs
+++ b/tests/typeset.rs
@@ -63,8 +63,9 @@ fn main() {
// We want to have "unbounded" pages, so we allow them to be infinitely
// large and fit them to match their content.
let mut state = State::default();
- state.page.size = Size::new(Length::pt(120.0), Length::inf());
- state.page.margins = Sides::splat(Some(Length::pt(10.0).into()));
+ let page = state.page_mut();
+ page.size = Size::new(Length::pt(120.0), Length::inf());
+ page.margins = Sides::splat(Some(Length::pt(10.0).into()));
// We hook up some extra test helpers into the global scope.
let mut std = typst::library::new();