Restructure tests
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 214 KiB After Width: | Height: | Size: 214 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.4 KiB |
BIN
tests/ref/markup/linebreak.png
Normal file
After Width: | Height: | Size: 593 B |
BIN
tests/ref/markup/shorthands.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@ -2,7 +2,6 @@
|
||||
|
||||
---
|
||||
// Variables.
|
||||
|
||||
#let name = "Typst"
|
||||
#let ke-bab = "Kebab!"
|
||||
#let α = "Alpha"
|
||||
@ -31,9 +30,7 @@
|
||||
{4.5cm} \
|
||||
{12e1pt} \
|
||||
{2.5rad} \
|
||||
{45deg} \
|
||||
// Not in monospace via repr.
|
||||
#repr(45deg)
|
||||
{45deg}
|
||||
|
||||
---
|
||||
// Colors.
|
||||
@ -55,3 +52,12 @@
|
||||
{rect} \
|
||||
{f} \
|
||||
{() => none}
|
||||
|
||||
---
|
||||
// Test using the `repr` function.
|
||||
|
||||
// Returns a string.
|
||||
#test(repr((1, 2, false, )), "(1, 2, false)")
|
||||
|
||||
// Not in monospace
|
||||
#repr(23deg)
|
||||
|
@ -46,4 +46,4 @@ von _v_ zu einem Blatt. Die Höhe des Baumes ist die Höhe der Wurzel.
|
||||
|
||||
// The `image` function returns a "template" value of the same type as
|
||||
// the `[...]` literals.
|
||||
#align(center, image("../../res/graph.png", width: 75%))
|
||||
#align(center, image("../res/graph.png", width: 75%))
|
@ -13,8 +13,8 @@
|
||||
// Error: 8-29 file not found
|
||||
#image("path/does/not/exist")
|
||||
|
||||
// Error: 8-20 failed to load image
|
||||
#image("./font.typ")
|
||||
// Error: 8-21 failed to load image
|
||||
#image("./image.typ")
|
||||
|
||||
---
|
||||
// Test configuring the size and fitting behaviour of images.
|
@ -1,4 +1,4 @@
|
||||
// Test the `grid` function.
|
||||
// Test grid layouts.
|
||||
|
||||
---
|
||||
#let rect(width, color) = rect(width: width, height: 2cm, fill: color)
|
@ -1,8 +1,6 @@
|
||||
// Test the `page` function.
|
||||
|
||||
---
|
||||
// Test configuring page sizes and margins.
|
||||
|
||||
---
|
||||
// Set width and height.
|
||||
#page(width: 120pt, height: 120pt)
|
||||
#page(width: 40pt)[High]
|
@ -1,4 +1,4 @@
|
||||
// Test the `pagebreak` function.
|
||||
// Test forced page breaks.
|
||||
|
||||
---
|
||||
First of two
|
@ -1,4 +1,4 @@
|
||||
// Test the `stack` function.
|
||||
// Test stack layouts.
|
||||
|
||||
---
|
||||
#let rect(width, color) = rect(width: width, height: 1cm, fill: color)
|
@ -1,16 +0,0 @@
|
||||
// Test the `lang` function.
|
||||
|
||||
---
|
||||
Left to right.
|
||||
|
||||
#lang("ar")
|
||||
Right to left.
|
||||
|
||||
#lang(dir: ltr)
|
||||
Back again.
|
||||
|
||||
---
|
||||
// Ref: false
|
||||
|
||||
// Error: 12-15 must be horizontal
|
||||
#lang(dir: ttb)
|
@ -1,12 +0,0 @@
|
||||
// Test basic markup.
|
||||
|
||||
---
|
||||
A \ B \ C
|
||||
|
||||
---
|
||||
Paragraph breaks
|
||||
|
||||
for you!
|
||||
|
||||
---
|
||||
The non-breaking~space does work.
|
4
tests/typ/markup/linebreak.typ
Normal file
@ -0,0 +1,4 @@
|
||||
// Test line breaks.
|
||||
|
||||
---
|
||||
A \ B \ C
|
7
tests/typ/markup/shorthands.typ
Normal file
@ -0,0 +1,7 @@
|
||||
// Test shorthands for unicode codepoints.
|
||||
|
||||
---
|
||||
The non-breaking~space does work.
|
||||
|
||||
---
|
||||
En dash: --
|
@ -1,27 +1,27 @@
|
||||
// Test bidirectional text.
|
||||
// Test bidirectional text and language configuration.
|
||||
|
||||
---
|
||||
// Test reordering with different top-level paragraph directions.
|
||||
#let text = [Text טֶקסט]
|
||||
#font("EB Garamond", "Noto Serif Hebrew")
|
||||
#lang("de") {text}
|
||||
#lang("he") {text}
|
||||
#lang("de") {text}
|
||||
|
||||
---
|
||||
// Test that consecutiv, embedded LTR runs stay LTR.
|
||||
// Test that consecutive, embedded LTR runs stay LTR.
|
||||
// Here, we have two runs: "A" and italic "B".
|
||||
#let text = [أنت A_B_مطرC]
|
||||
#font("EB Garamond", "Noto Sans Arabic")
|
||||
#lang("de") {text}
|
||||
#lang("ar") {text}
|
||||
#lang("de") {text}
|
||||
|
||||
---
|
||||
// Test that consecutive, embedded RTL runs stay RTL.
|
||||
// Here, we have three runs: "גֶ", bold "שֶׁ", and "ם".
|
||||
#let text = [Aגֶ*שֶׁ*םB]
|
||||
#font("EB Garamond", "Noto Serif Hebrew")
|
||||
#lang("de") {text}
|
||||
#lang("he") {text}
|
||||
#lang("de") {text}
|
||||
|
||||
---
|
||||
// Test embedding up to level 4 with isolates.
|
||||
@ -47,3 +47,10 @@ Lריווח #h(1cm) R
|
||||
#font("Noto Serif Hebrew", "EB Garamond")
|
||||
#lang("he")
|
||||
קרנפיםRh#image("../../res/rhino.png", height: 11pt)inoחיים
|
||||
|
||||
---
|
||||
// Test the `lang` function.
|
||||
// Ref: false
|
||||
|
||||
// Error: 12-15 must be horizontal
|
||||
#lang(dir: ttb)
|
||||
|
@ -1,8 +1,6 @@
|
||||
// Test the `font` function.
|
||||
|
||||
---
|
||||
// Test configuring font properties.
|
||||
|
||||
---
|
||||
// Set same font size in three different ways.
|
||||
#font(22pt)[A]
|
||||
#font(200%)[A]
|
@ -1,8 +1,6 @@
|
||||
// Test the `paragraph` function.
|
||||
|
||||
---
|
||||
// Test configuring paragraph properties.
|
||||
|
||||
---
|
||||
// FIXME: Word spacing doesn't work due to new shaping process.
|
||||
#par(spacing: 10pt, leading: 25%, word-spacing: 1pt)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Test math functions.
|
||||
// Test basic calculation functions.
|
||||
// Ref: false
|
||||
|
||||
---
|
@ -1,10 +1,6 @@
|
||||
// Test basic functions.
|
||||
// Test color creation functions.
|
||||
// Ref: false
|
||||
|
||||
---
|
||||
#test(type("hi"), "string")
|
||||
#test(repr((1, 2, false, )), "(1, 2, false)")
|
||||
|
||||
---
|
||||
// Check the output.
|
||||
#test(rgb(0.0, 0.3, 0.7), #004db3)
|