Restructure tests

This commit is contained in:
Laurenz 2021-06-10 16:46:01 +02:00
parent bce553a991
commit 5611c26577
44 changed files with 44 additions and 58 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 214 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -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)

View File

@ -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%))

View File

@ -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.

View File

@ -1,4 +1,4 @@
// Test the `grid` function.
// Test grid layouts.
---
#let rect(width, color) = rect(width: width, height: 2cm, fill: color)

View File

@ -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]

View File

@ -1,4 +1,4 @@
// Test the `pagebreak` function.
// Test forced page breaks.
---
First of two

View File

@ -1,4 +1,4 @@
// Test the `stack` function.
// Test stack layouts.
---
#let rect(width, color) = rect(width: width, height: 1cm, fill: color)

View File

@ -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)

View File

@ -1,12 +0,0 @@
// Test basic markup.
---
A \ B \ C
---
Paragraph breaks
for you!
---
The non-breaking~space does work.

View File

@ -0,0 +1,4 @@
// Test line breaks.
---
A \ B \ C

View File

@ -0,0 +1,7 @@
// Test shorthands for unicode codepoints.
---
The non-breaking~space does work.
---
En dash: --

View File

@ -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)

View File

@ -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]

View File

@ -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)

View File

@ -1,4 +1,4 @@
// Test math functions.
// Test basic calculation functions.
// Ref: false
---

View File

@ -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)