summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/suite/layout/measure.typ13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/suite/layout/measure.typ b/tests/suite/layout/measure.typ
index 5f82e915..10c3c818 100644
--- a/tests/suite/layout/measure.typ
+++ b/tests/suite/layout/measure.typ
@@ -7,3 +7,16 @@
}
#text(10pt, f(6pt, 8pt))
#text(20pt, f(13pt, 14pt))
+
+--- measure-given-area ---
+// Test `measure` given an area.
+#let text = lorem(100)
+
+#context {
+ let d1 = measure(text)
+ assert(d1.width > 2000pt)
+ assert(d1.height < 10pt)
+ let d2 = measure(width: 400pt, height: auto, text)
+ assert(d2.width < 400pt)
+ assert(d2.height > 50pt)
+}