diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-28 15:50:48 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-28 23:54:34 +0100 |
| commit | 3ca5b238238e1128aa7bbfbd5db9e632045d8600 (patch) | |
| tree | 2471f4b340a15695b7f4d518c0b39fabaea676c4 /tests | |
| parent | b63c21c91d99a1554a019dc275f955d3e6a34271 (diff) | |
Reorganize library
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/elements/enum.png (renamed from tests/ref/markup/enums.png) | bin | 26118 -> 26118 bytes | |||
| -rw-r--r-- | tests/ref/elements/heading.png (renamed from tests/ref/markup/heading.png) | bin | 25291 -> 25291 bytes | |||
| -rw-r--r-- | tests/ref/elements/image.png (renamed from tests/ref/layout/image.png) | bin | 183386 -> 183386 bytes | |||
| -rw-r--r-- | tests/ref/elements/list.png (renamed from tests/ref/markup/lists.png) | bin | 21396 -> 21396 bytes | |||
| -rw-r--r-- | tests/ref/elements/math.png (renamed from tests/ref/markup/math.png) | bin | 3444 -> 3444 bytes | |||
| -rw-r--r-- | tests/ref/elements/shape-aspect.png (renamed from tests/ref/layout/shape-aspect.png) | bin | 4663 -> 4663 bytes | |||
| -rw-r--r-- | tests/ref/elements/shape-circle.png (renamed from tests/ref/layout/shape-circle.png) | bin | 40653 -> 40653 bytes | |||
| -rw-r--r-- | tests/ref/elements/shape-ellipse.png (renamed from tests/ref/layout/shape-ellipse.png) | bin | 22046 -> 22046 bytes | |||
| -rw-r--r-- | tests/ref/elements/shape-fill-stroke.png (renamed from tests/ref/layout/shape-fill-stroke.png) | bin | 2893 -> 2893 bytes | |||
| -rw-r--r-- | tests/ref/elements/shape-rect.png (renamed from tests/ref/layout/shape-rect.png) | bin | 7261 -> 7261 bytes | |||
| -rw-r--r-- | tests/ref/elements/shape-square.png (renamed from tests/ref/layout/shape-square.png) | bin | 18777 -> 18777 bytes | |||
| -rw-r--r-- | tests/ref/elements/table.png (renamed from tests/ref/layout/table.png) | bin | 1566 -> 1566 bytes | |||
| -rw-r--r-- | tests/ref/layout/container.png (renamed from tests/ref/layout/box-block.png) | bin | 7628 -> 7628 bytes | |||
| -rw-r--r-- | tests/ref/markup/linebreak.png | bin | 641 -> 0 bytes | |||
| -rw-r--r-- | tests/ref/text/deco.png (renamed from tests/ref/text/decorations.png) | bin | 29421 -> 29421 bytes | |||
| -rw-r--r-- | tests/ref/text/emph-strong.png (renamed from tests/ref/markup/emph-strong.png) | bin | 6988 -> 6988 bytes | |||
| -rw-r--r-- | tests/ref/text/escape.png (renamed from tests/ref/markup/escape.png) | bin | 13675 -> 13675 bytes | |||
| -rw-r--r-- | tests/ref/text/linebreak.png (renamed from tests/ref/text/linebreaks.png) | bin | 14308 -> 14308 bytes | |||
| -rw-r--r-- | tests/ref/text/link.png (renamed from tests/ref/text/links.png) | bin | 35262 -> 35262 bytes | |||
| -rw-r--r-- | tests/ref/text/raw.png (renamed from tests/ref/markup/raw.png) | bin | 22255 -> 22255 bytes | |||
| -rw-r--r-- | tests/ref/text/shorthands.png (renamed from tests/ref/markup/shorthands.png) | bin | 3838 -> 3838 bytes | |||
| -rw-r--r-- | tests/typ/elements/enum.typ (renamed from tests/typ/markup/enums.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/heading.typ (renamed from tests/typ/markup/heading.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/image.typ (renamed from tests/typ/layout/image.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/list.typ (renamed from tests/typ/markup/lists.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/math.typ (renamed from tests/typ/markup/math.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/shape-aspect.typ (renamed from tests/typ/layout/shape-aspect.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/shape-circle.typ (renamed from tests/typ/layout/shape-circle.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/shape-ellipse.typ (renamed from tests/typ/layout/shape-ellipse.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/shape-fill-stroke.typ (renamed from tests/typ/layout/shape-fill-stroke.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/shape-rect.typ (renamed from tests/typ/layout/shape-rect.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/shape-square.typ (renamed from tests/typ/layout/shape-square.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/elements/table.typ (renamed from tests/typ/layout/table.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/layout/container.typ (renamed from tests/typ/layout/box-block.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/markup/linebreak.typ | 4 | ||||
| -rw-r--r-- | tests/typ/text/deco.typ (renamed from tests/typ/text/decorations.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/text/emph-strong.typ (renamed from tests/typ/markup/emph-strong.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/text/escape.typ (renamed from tests/typ/markup/escape.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/text/linebreak.typ (renamed from tests/typ/text/linebreaks.typ) | 2 | ||||
| -rw-r--r-- | tests/typ/text/link.typ (renamed from tests/typ/text/links.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/text/raw.typ (renamed from tests/typ/markup/raw.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/text/shorthands.typ (renamed from tests/typ/markup/shorthands.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/utility/collection.typ | 6 | ||||
| -rw-r--r-- | tests/typ/utility/strings.typ | 12 | ||||
| -rw-r--r-- | tests/typeset.rs | 3 |
45 files changed, 14 insertions, 13 deletions
diff --git a/tests/ref/markup/enums.png b/tests/ref/elements/enum.png Binary files differindex ecd1cf53..ecd1cf53 100644 --- a/tests/ref/markup/enums.png +++ b/tests/ref/elements/enum.png diff --git a/tests/ref/markup/heading.png b/tests/ref/elements/heading.png Binary files differindex 09f3d7c7..09f3d7c7 100644 --- a/tests/ref/markup/heading.png +++ b/tests/ref/elements/heading.png diff --git a/tests/ref/layout/image.png b/tests/ref/elements/image.png Binary files differindex 11a28980..11a28980 100644 --- a/tests/ref/layout/image.png +++ b/tests/ref/elements/image.png diff --git a/tests/ref/markup/lists.png b/tests/ref/elements/list.png Binary files differindex 503bfc9a..503bfc9a 100644 --- a/tests/ref/markup/lists.png +++ b/tests/ref/elements/list.png diff --git a/tests/ref/markup/math.png b/tests/ref/elements/math.png Binary files differindex 77ec8d51..77ec8d51 100644 --- a/tests/ref/markup/math.png +++ b/tests/ref/elements/math.png diff --git a/tests/ref/layout/shape-aspect.png b/tests/ref/elements/shape-aspect.png Binary files differindex 719c1e6e..719c1e6e 100644 --- a/tests/ref/layout/shape-aspect.png +++ b/tests/ref/elements/shape-aspect.png diff --git a/tests/ref/layout/shape-circle.png b/tests/ref/elements/shape-circle.png Binary files differindex 040c6f0b..040c6f0b 100644 --- a/tests/ref/layout/shape-circle.png +++ b/tests/ref/elements/shape-circle.png diff --git a/tests/ref/layout/shape-ellipse.png b/tests/ref/elements/shape-ellipse.png Binary files differindex 740f005f..740f005f 100644 --- a/tests/ref/layout/shape-ellipse.png +++ b/tests/ref/elements/shape-ellipse.png diff --git a/tests/ref/layout/shape-fill-stroke.png b/tests/ref/elements/shape-fill-stroke.png Binary files differindex 12fcbd55..12fcbd55 100644 --- a/tests/ref/layout/shape-fill-stroke.png +++ b/tests/ref/elements/shape-fill-stroke.png diff --git a/tests/ref/layout/shape-rect.png b/tests/ref/elements/shape-rect.png Binary files differindex 1fdb0dac..1fdb0dac 100644 --- a/tests/ref/layout/shape-rect.png +++ b/tests/ref/elements/shape-rect.png diff --git a/tests/ref/layout/shape-square.png b/tests/ref/elements/shape-square.png Binary files differindex 00a0c848..00a0c848 100644 --- a/tests/ref/layout/shape-square.png +++ b/tests/ref/elements/shape-square.png diff --git a/tests/ref/layout/table.png b/tests/ref/elements/table.png Binary files differindex bc70d548..bc70d548 100644 --- a/tests/ref/layout/table.png +++ b/tests/ref/elements/table.png diff --git a/tests/ref/layout/box-block.png b/tests/ref/layout/container.png Binary files differindex 87484c25..87484c25 100644 --- a/tests/ref/layout/box-block.png +++ b/tests/ref/layout/container.png diff --git a/tests/ref/markup/linebreak.png b/tests/ref/markup/linebreak.png Binary files differdeleted file mode 100644 index 2304ab96..00000000 --- a/tests/ref/markup/linebreak.png +++ /dev/null diff --git a/tests/ref/text/decorations.png b/tests/ref/text/deco.png Binary files differindex 684532a1..684532a1 100644 --- a/tests/ref/text/decorations.png +++ b/tests/ref/text/deco.png diff --git a/tests/ref/markup/emph-strong.png b/tests/ref/text/emph-strong.png Binary files differindex cce98812..cce98812 100644 --- a/tests/ref/markup/emph-strong.png +++ b/tests/ref/text/emph-strong.png diff --git a/tests/ref/markup/escape.png b/tests/ref/text/escape.png Binary files differindex 3434d6e0..3434d6e0 100644 --- a/tests/ref/markup/escape.png +++ b/tests/ref/text/escape.png diff --git a/tests/ref/text/linebreaks.png b/tests/ref/text/linebreak.png Binary files differindex 1498a845..1498a845 100644 --- a/tests/ref/text/linebreaks.png +++ b/tests/ref/text/linebreak.png diff --git a/tests/ref/text/links.png b/tests/ref/text/link.png Binary files differindex 75ea19e8..75ea19e8 100644 --- a/tests/ref/text/links.png +++ b/tests/ref/text/link.png diff --git a/tests/ref/markup/raw.png b/tests/ref/text/raw.png Binary files differindex 64402dae..64402dae 100644 --- a/tests/ref/markup/raw.png +++ b/tests/ref/text/raw.png diff --git a/tests/ref/markup/shorthands.png b/tests/ref/text/shorthands.png Binary files differindex ad09967d..ad09967d 100644 --- a/tests/ref/markup/shorthands.png +++ b/tests/ref/text/shorthands.png diff --git a/tests/typ/markup/enums.typ b/tests/typ/elements/enum.typ index 8ba3cea6..8ba3cea6 100644 --- a/tests/typ/markup/enums.typ +++ b/tests/typ/elements/enum.typ diff --git a/tests/typ/markup/heading.typ b/tests/typ/elements/heading.typ index 2ae97aa8..2ae97aa8 100644 --- a/tests/typ/markup/heading.typ +++ b/tests/typ/elements/heading.typ diff --git a/tests/typ/layout/image.typ b/tests/typ/elements/image.typ index 8817713f..8817713f 100644 --- a/tests/typ/layout/image.typ +++ b/tests/typ/elements/image.typ diff --git a/tests/typ/markup/lists.typ b/tests/typ/elements/list.typ index 38fc2c63..38fc2c63 100644 --- a/tests/typ/markup/lists.typ +++ b/tests/typ/elements/list.typ diff --git a/tests/typ/markup/math.typ b/tests/typ/elements/math.typ index cad01d10..cad01d10 100644 --- a/tests/typ/markup/math.typ +++ b/tests/typ/elements/math.typ diff --git a/tests/typ/layout/shape-aspect.typ b/tests/typ/elements/shape-aspect.typ index 2c3e9b0c..2c3e9b0c 100644 --- a/tests/typ/layout/shape-aspect.typ +++ b/tests/typ/elements/shape-aspect.typ diff --git a/tests/typ/layout/shape-circle.typ b/tests/typ/elements/shape-circle.typ index 4b978e86..4b978e86 100644 --- a/tests/typ/layout/shape-circle.typ +++ b/tests/typ/elements/shape-circle.typ diff --git a/tests/typ/layout/shape-ellipse.typ b/tests/typ/elements/shape-ellipse.typ index 154144c4..154144c4 100644 --- a/tests/typ/layout/shape-ellipse.typ +++ b/tests/typ/elements/shape-ellipse.typ diff --git a/tests/typ/layout/shape-fill-stroke.typ b/tests/typ/elements/shape-fill-stroke.typ index 935f3bc7..935f3bc7 100644 --- a/tests/typ/layout/shape-fill-stroke.typ +++ b/tests/typ/elements/shape-fill-stroke.typ diff --git a/tests/typ/layout/shape-rect.typ b/tests/typ/elements/shape-rect.typ index add39b80..add39b80 100644 --- a/tests/typ/layout/shape-rect.typ +++ b/tests/typ/elements/shape-rect.typ diff --git a/tests/typ/layout/shape-square.typ b/tests/typ/elements/shape-square.typ index c4ece778..c4ece778 100644 --- a/tests/typ/layout/shape-square.typ +++ b/tests/typ/elements/shape-square.typ diff --git a/tests/typ/layout/table.typ b/tests/typ/elements/table.typ index 0372951c..0372951c 100644 --- a/tests/typ/layout/table.typ +++ b/tests/typ/elements/table.typ diff --git a/tests/typ/layout/box-block.typ b/tests/typ/layout/container.typ index c6928074..c6928074 100644 --- a/tests/typ/layout/box-block.typ +++ b/tests/typ/layout/container.typ diff --git a/tests/typ/markup/linebreak.typ b/tests/typ/markup/linebreak.typ deleted file mode 100644 index 7fe8a718..00000000 --- a/tests/typ/markup/linebreak.typ +++ /dev/null @@ -1,4 +0,0 @@ -// Test line breaks. - ---- -A \ B \ C diff --git a/tests/typ/text/decorations.typ b/tests/typ/text/deco.typ index e0693ca3..e0693ca3 100644 --- a/tests/typ/text/decorations.typ +++ b/tests/typ/text/deco.typ diff --git a/tests/typ/markup/emph-strong.typ b/tests/typ/text/emph-strong.typ index 9bdb5059..9bdb5059 100644 --- a/tests/typ/markup/emph-strong.typ +++ b/tests/typ/text/emph-strong.typ diff --git a/tests/typ/markup/escape.typ b/tests/typ/text/escape.typ index 6ec469c1..6ec469c1 100644 --- a/tests/typ/markup/escape.typ +++ b/tests/typ/text/escape.typ diff --git a/tests/typ/text/linebreaks.typ b/tests/typ/text/linebreak.typ index 25a8c5ab..ff8559d6 100644 --- a/tests/typ/text/linebreaks.typ +++ b/tests/typ/text/linebreak.typ @@ -1,4 +1,4 @@ -// Test line breaking special cases. +// Test line breaks. --- // Test overlong word that is not directly after a hard break. diff --git a/tests/typ/text/links.typ b/tests/typ/text/link.typ index 99037ee3..99037ee3 100644 --- a/tests/typ/text/links.typ +++ b/tests/typ/text/link.typ diff --git a/tests/typ/markup/raw.typ b/tests/typ/text/raw.typ index 0e053a9b..0e053a9b 100644 --- a/tests/typ/markup/raw.typ +++ b/tests/typ/text/raw.typ diff --git a/tests/typ/markup/shorthands.typ b/tests/typ/text/shorthands.typ index ef0bf866..ef0bf866 100644 --- a/tests/typ/markup/shorthands.typ +++ b/tests/typ/text/shorthands.typ diff --git a/tests/typ/utility/collection.typ b/tests/typ/utility/collection.typ index 92ec2867..a4bc817e 100644 --- a/tests/typ/utility/collection.typ +++ b/tests/typ/utility/collection.typ @@ -2,12 +2,6 @@ // Ref: false --- -#let memes = "ArE mEmEs gReAt?"; -#test(lower(memes), "are memes great?") -#test(upper(memes), "ARE MEMES GREAT?") -#test(upper("Ελλάδα"), "ΕΛΛΆΔΑ") - ---- // Test the `len` function. #test(len(()), 0) #test(len(("A", "B", "C")), 3) diff --git a/tests/typ/utility/strings.typ b/tests/typ/utility/strings.typ index 91be0faa..4222266b 100644 --- a/tests/typ/utility/strings.typ +++ b/tests/typ/utility/strings.typ @@ -1,7 +1,17 @@ -// Test string functions. +// Test string handling functions. +// Ref: false --- // Test the `upper`, `lower`, and number formatting functions. +#let memes = "ArE mEmEs gReAt?"; +#test(lower(memes), "are memes great?") +#test(upper(memes), "ARE MEMES GREAT?") +#test(upper("Ελλάδα"), "ΕΛΛΆΔΑ") + +--- +// Test numbering formatting functions. +// Ref: true + #upper("Abc 8") #upper[def] diff --git a/tests/typeset.rs b/tests/typeset.rs index 1b45a975..388d4516 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -12,7 +12,8 @@ use typst::diag::Error; use typst::eval::{Smart, StyleMap, Value}; use typst::frame::{Element, Frame}; use typst::geom::{Length, RgbaColor}; -use typst::library::{PageNode, TextNode}; +use typst::library::layout::PageNode; +use typst::library::text::TextNode; use typst::loading::FsLoader; use typst::parse::Scanner; use typst::source::SourceFile; |
