diff options
| author | Martin Haug <mhaug@live.de> | 2022-05-03 11:40:27 +0200 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2022-05-03 12:59:41 +0200 |
| commit | 6a8a0ec6ec8bb8cf346ee0dd2c45ddcfbee7fbe6 (patch) | |
| tree | 0d8716d2fa0c01a2319bb84be0283253bc6490fe /tests | |
| parent | 33213abe7dfcb8d8065faadd2f5b72ec4b718af1 (diff) | |
Code Review: Heap is Stack. Unsafe is Good.
Spaghetti Code is Style.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/layout/page.png | bin | 7390 -> 7401 bytes | |||
| -rw-r--r-- | tests/typ/graphics/shape-rect.typ | 8 | ||||
| -rw-r--r-- | tests/typ/layout/page-margin.typ | 8 | ||||
| -rw-r--r-- | tests/typeset.rs | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/tests/ref/layout/page.png b/tests/ref/layout/page.png Binary files differindex e0618e58..35716e4d 100644 --- a/tests/ref/layout/page.png +++ b/tests/ref/layout/page.png diff --git a/tests/typ/graphics/shape-rect.typ b/tests/typ/graphics/shape-rect.typ index 3d157675..a29550b5 100644 --- a/tests/typ/graphics/shape-rect.typ +++ b/tests/typ/graphics/shape-rect.typ @@ -35,20 +35,20 @@ // Different strokes. [ - #set rect(stroke: (right: red,)) + #set rect(stroke: (right: red)) #rect(width: 100%, fill: lime, stroke: (x: 5pt, y: 1pt)) ] --- // Outset padding. -#let inline-code(body) = [ +#show node: raw as [ #set text("IBM Plex Mono", 8pt) #h(.7em, weak: true) - #rect(radius: 3pt, outset: (y: 3pt, x: 2.5pt), fill: rgb(239, 241, 243), body) + #rect(radius: 3pt, outset: (y: 3pt, x: 2.5pt), fill: rgb(239, 241, 243))[{node.text}] #h(.7em, weak: true) ] -Use the #inline-code[\*const ptr] pointer. +Use the `*const ptr` pointer. --- // Error: 15-38 unexpected key "cake" diff --git a/tests/typ/layout/page-margin.typ b/tests/typ/layout/page-margin.typ index e30518b0..290c4081 100644 --- a/tests/typ/layout/page-margin.typ +++ b/tests/typ/layout/page-margin.typ @@ -11,10 +11,10 @@ --- // Set individual margins. #set page(height: 40pt) -[#set page(margins: (left: 0pt,)); #align(left)[Left]] -[#set page(margins: (right: 0pt,)); #align(right)[Right]] -[#set page(margins: (top: 0pt,)); #align(top)[Top]] -[#set page(margins: (bottom: 0pt,)); #align(bottom)[Bottom]] +[#set page(margins: (left: 0pt)); #align(left)[Left]] +[#set page(margins: (right: 0pt)); #align(right)[Right]] +[#set page(margins: (top: 0pt)); #align(top)[Top]] +[#set page(margins: (bottom: 0pt)); #align(bottom)[Bottom]] // Ensure that specific margins override general margins. [#set page(margins: (rest: 0pt, left: 20pt)); Overriden] diff --git a/tests/typeset.rs b/tests/typeset.rs index d3f7844b..b0452163 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -66,7 +66,7 @@ fn main() { styles.set(PageNode::HEIGHT, Smart::Auto); styles.set( PageNode::MARGINS, - Sides::splat(Smart::Custom(Length::pt(10.0).into())), + Sides::splat(Some(Smart::Custom(Length::pt(10.0).into()))), ); styles.set(TextNode::SIZE, TextSize(Length::pt(10.0).into())); |
