summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-06-29 16:00:46 +0200
committerLaurenz <laurmaedje@gmail.com>2021-06-29 16:00:46 +0200
commitb2fb42cc7019b0269e892c4e39c52557252fecf9 (patch)
tree940b7924a0b44e77821817563818829898dc4c39 /tests
parent32a6b673bc4b73ade5863b0166c0779597cede5c (diff)
Make even more use of wide calls
Diffstat (limited to 'tests')
-rw-r--r--tests/typ/insert/circle.typ14
-rw-r--r--tests/typ/insert/ellipse.typ9
-rw-r--r--tests/typ/insert/square.typ4
-rw-r--r--tests/typ/layout/pad.typ5
-rw-r--r--tests/typ/layout/pagebreak.typ4
5 files changed, 21 insertions, 15 deletions
diff --git a/tests/typ/insert/circle.typ b/tests/typ/insert/circle.typ
index 7722d006..1c8808a4 100644
--- a/tests/typ/insert/circle.typ
+++ b/tests/typ/insert/circle.typ
@@ -4,18 +4,24 @@
// Test auto sizing.
Auto-sized circle. \
-#circle(fill: #eb5278, align(center, center, [But, soft!]))
+#circle(fill: #eb5278)[
+ #align!(center, center)
+ But, soft!
+]
Center-aligned rect in auto-sized circle.
#circle(fill: forest)[
#align!(center, center)
- #rect(fill: conifer, pad(5pt)[But, soft!])
+ #rect!(fill: conifer)
+ #pad!(5pt)
+ But, soft!
]
100%-width rect in auto-sized circle. \
-#circle(fill: forest, rect(width: 100%, fill: conifer)[
+#circle(fill: forest)[
+ #rect!(width: 100%, fill: conifer)
But, soft! what light through yonder window breaks?
-])
+]
Expanded by height.
#circle(fill: conifer)[A \ B \ C]
diff --git a/tests/typ/insert/ellipse.typ b/tests/typ/insert/ellipse.typ
index 9b10eded..a086ab74 100644
--- a/tests/typ/insert/ellipse.typ
+++ b/tests/typ/insert/ellipse.typ
@@ -3,11 +3,10 @@
---
100% rect in 100% ellipse in fixed rect. \
#rect(width: 3cm, height: 2cm, fill: #2a631a)[
- #ellipse(width: 100%, height: 100%, fill: forest)[
- #rect(width: 100%, height: 100%, fill: conifer)[
- #align(center, center)[Stuff inside an ellipse!]
- ]
- ]
+ #ellipse!(width: 100%, height: 100%, fill: forest)
+ #rect!(width: 100%, height: 100%, fill: conifer)
+ #align!(center, center)
+ Stuff inside an ellipse!
]
Auto-sized ellipse. \
diff --git a/tests/typ/insert/square.typ b/tests/typ/insert/square.typ
index f7e1e09e..4dd8964f 100644
--- a/tests/typ/insert/square.typ
+++ b/tests/typ/insert/square.typ
@@ -4,7 +4,9 @@
Auto-sized square. \
#square(fill: eastern)[
#align!(center)
- #pad(5pt, font(color: #fff, weight: bold)[Typst])
+ #pad!(5pt)
+ #font!(color: #fff, weight: bold)
+ Typst
]
---
diff --git a/tests/typ/layout/pad.typ b/tests/typ/layout/pad.typ
index 17e5cb0b..05f9b359 100644
--- a/tests/typ/layout/pad.typ
+++ b/tests/typ/layout/pad.typ
@@ -6,9 +6,8 @@
// All sides together.
#rect(fill: conifer)[
- #pad(10pt, right: 20pt)[
- #rect(width: 20pt, height: 20pt, fill: #eb5278)
- ]
+ #pad!(10pt, right: 20pt)
+ #rect(width: 20pt, height: 20pt, fill: #eb5278)
]
// Error: 13-23 missing argument: body
diff --git a/tests/typ/layout/pagebreak.typ b/tests/typ/layout/pagebreak.typ
index ac0a3833..b13a1bfd 100644
--- a/tests/typ/layout/pagebreak.typ
+++ b/tests/typ/layout/pagebreak.typ
@@ -13,8 +13,8 @@ A
// Error: 16 cannot modify page from here
#pagebreak()
- // Error: 12-16 cannot modify page from here
- #page!("a4")
+ // Error: 11-15 cannot modify page from here
+ #page("a4")[]
]
C