summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-02-28 15:50:48 +0100
committerLaurenz <laurmaedje@gmail.com>2022-02-28 23:54:34 +0100
commit3ca5b238238e1128aa7bbfbd5db9e632045d8600 (patch)
tree2471f4b340a15695b7f4d518c0b39fabaea676c4 /tests
parentb63c21c91d99a1554a019dc275f955d3e6a34271 (diff)
Reorganize library
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/elements/enum.png (renamed from tests/ref/markup/enums.png)bin26118 -> 26118 bytes
-rw-r--r--tests/ref/elements/heading.png (renamed from tests/ref/markup/heading.png)bin25291 -> 25291 bytes
-rw-r--r--tests/ref/elements/image.png (renamed from tests/ref/layout/image.png)bin183386 -> 183386 bytes
-rw-r--r--tests/ref/elements/list.png (renamed from tests/ref/markup/lists.png)bin21396 -> 21396 bytes
-rw-r--r--tests/ref/elements/math.png (renamed from tests/ref/markup/math.png)bin3444 -> 3444 bytes
-rw-r--r--tests/ref/elements/shape-aspect.png (renamed from tests/ref/layout/shape-aspect.png)bin4663 -> 4663 bytes
-rw-r--r--tests/ref/elements/shape-circle.png (renamed from tests/ref/layout/shape-circle.png)bin40653 -> 40653 bytes
-rw-r--r--tests/ref/elements/shape-ellipse.png (renamed from tests/ref/layout/shape-ellipse.png)bin22046 -> 22046 bytes
-rw-r--r--tests/ref/elements/shape-fill-stroke.png (renamed from tests/ref/layout/shape-fill-stroke.png)bin2893 -> 2893 bytes
-rw-r--r--tests/ref/elements/shape-rect.png (renamed from tests/ref/layout/shape-rect.png)bin7261 -> 7261 bytes
-rw-r--r--tests/ref/elements/shape-square.png (renamed from tests/ref/layout/shape-square.png)bin18777 -> 18777 bytes
-rw-r--r--tests/ref/elements/table.png (renamed from tests/ref/layout/table.png)bin1566 -> 1566 bytes
-rw-r--r--tests/ref/layout/container.png (renamed from tests/ref/layout/box-block.png)bin7628 -> 7628 bytes
-rw-r--r--tests/ref/markup/linebreak.pngbin641 -> 0 bytes
-rw-r--r--tests/ref/text/deco.png (renamed from tests/ref/text/decorations.png)bin29421 -> 29421 bytes
-rw-r--r--tests/ref/text/emph-strong.png (renamed from tests/ref/markup/emph-strong.png)bin6988 -> 6988 bytes
-rw-r--r--tests/ref/text/escape.png (renamed from tests/ref/markup/escape.png)bin13675 -> 13675 bytes
-rw-r--r--tests/ref/text/linebreak.png (renamed from tests/ref/text/linebreaks.png)bin14308 -> 14308 bytes
-rw-r--r--tests/ref/text/link.png (renamed from tests/ref/text/links.png)bin35262 -> 35262 bytes
-rw-r--r--tests/ref/text/raw.png (renamed from tests/ref/markup/raw.png)bin22255 -> 22255 bytes
-rw-r--r--tests/ref/text/shorthands.png (renamed from tests/ref/markup/shorthands.png)bin3838 -> 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.typ4
-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.typ6
-rw-r--r--tests/typ/utility/strings.typ12
-rw-r--r--tests/typeset.rs3
45 files changed, 14 insertions, 13 deletions
diff --git a/tests/ref/markup/enums.png b/tests/ref/elements/enum.png
index ecd1cf53..ecd1cf53 100644
--- a/tests/ref/markup/enums.png
+++ b/tests/ref/elements/enum.png
Binary files differ
diff --git a/tests/ref/markup/heading.png b/tests/ref/elements/heading.png
index 09f3d7c7..09f3d7c7 100644
--- a/tests/ref/markup/heading.png
+++ b/tests/ref/elements/heading.png
Binary files differ
diff --git a/tests/ref/layout/image.png b/tests/ref/elements/image.png
index 11a28980..11a28980 100644
--- a/tests/ref/layout/image.png
+++ b/tests/ref/elements/image.png
Binary files differ
diff --git a/tests/ref/markup/lists.png b/tests/ref/elements/list.png
index 503bfc9a..503bfc9a 100644
--- a/tests/ref/markup/lists.png
+++ b/tests/ref/elements/list.png
Binary files differ
diff --git a/tests/ref/markup/math.png b/tests/ref/elements/math.png
index 77ec8d51..77ec8d51 100644
--- a/tests/ref/markup/math.png
+++ b/tests/ref/elements/math.png
Binary files differ
diff --git a/tests/ref/layout/shape-aspect.png b/tests/ref/elements/shape-aspect.png
index 719c1e6e..719c1e6e 100644
--- a/tests/ref/layout/shape-aspect.png
+++ b/tests/ref/elements/shape-aspect.png
Binary files differ
diff --git a/tests/ref/layout/shape-circle.png b/tests/ref/elements/shape-circle.png
index 040c6f0b..040c6f0b 100644
--- a/tests/ref/layout/shape-circle.png
+++ b/tests/ref/elements/shape-circle.png
Binary files differ
diff --git a/tests/ref/layout/shape-ellipse.png b/tests/ref/elements/shape-ellipse.png
index 740f005f..740f005f 100644
--- a/tests/ref/layout/shape-ellipse.png
+++ b/tests/ref/elements/shape-ellipse.png
Binary files differ
diff --git a/tests/ref/layout/shape-fill-stroke.png b/tests/ref/elements/shape-fill-stroke.png
index 12fcbd55..12fcbd55 100644
--- a/tests/ref/layout/shape-fill-stroke.png
+++ b/tests/ref/elements/shape-fill-stroke.png
Binary files differ
diff --git a/tests/ref/layout/shape-rect.png b/tests/ref/elements/shape-rect.png
index 1fdb0dac..1fdb0dac 100644
--- a/tests/ref/layout/shape-rect.png
+++ b/tests/ref/elements/shape-rect.png
Binary files differ
diff --git a/tests/ref/layout/shape-square.png b/tests/ref/elements/shape-square.png
index 00a0c848..00a0c848 100644
--- a/tests/ref/layout/shape-square.png
+++ b/tests/ref/elements/shape-square.png
Binary files differ
diff --git a/tests/ref/layout/table.png b/tests/ref/elements/table.png
index bc70d548..bc70d548 100644
--- a/tests/ref/layout/table.png
+++ b/tests/ref/elements/table.png
Binary files differ
diff --git a/tests/ref/layout/box-block.png b/tests/ref/layout/container.png
index 87484c25..87484c25 100644
--- a/tests/ref/layout/box-block.png
+++ b/tests/ref/layout/container.png
Binary files differ
diff --git a/tests/ref/markup/linebreak.png b/tests/ref/markup/linebreak.png
deleted file mode 100644
index 2304ab96..00000000
--- a/tests/ref/markup/linebreak.png
+++ /dev/null
Binary files differ
diff --git a/tests/ref/text/decorations.png b/tests/ref/text/deco.png
index 684532a1..684532a1 100644
--- a/tests/ref/text/decorations.png
+++ b/tests/ref/text/deco.png
Binary files differ
diff --git a/tests/ref/markup/emph-strong.png b/tests/ref/text/emph-strong.png
index cce98812..cce98812 100644
--- a/tests/ref/markup/emph-strong.png
+++ b/tests/ref/text/emph-strong.png
Binary files differ
diff --git a/tests/ref/markup/escape.png b/tests/ref/text/escape.png
index 3434d6e0..3434d6e0 100644
--- a/tests/ref/markup/escape.png
+++ b/tests/ref/text/escape.png
Binary files differ
diff --git a/tests/ref/text/linebreaks.png b/tests/ref/text/linebreak.png
index 1498a845..1498a845 100644
--- a/tests/ref/text/linebreaks.png
+++ b/tests/ref/text/linebreak.png
Binary files differ
diff --git a/tests/ref/text/links.png b/tests/ref/text/link.png
index 75ea19e8..75ea19e8 100644
--- a/tests/ref/text/links.png
+++ b/tests/ref/text/link.png
Binary files differ
diff --git a/tests/ref/markup/raw.png b/tests/ref/text/raw.png
index 64402dae..64402dae 100644
--- a/tests/ref/markup/raw.png
+++ b/tests/ref/text/raw.png
Binary files differ
diff --git a/tests/ref/markup/shorthands.png b/tests/ref/text/shorthands.png
index ad09967d..ad09967d 100644
--- a/tests/ref/markup/shorthands.png
+++ b/tests/ref/text/shorthands.png
Binary files differ
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;