summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/base/blind.png (renamed from tests/ref/utility/blind.png)bin27575 -> 27575 bytes
-rw-r--r--tests/ref/base/collection.png (renamed from tests/ref/utility/collection.png)bin1384 -> 1384 bytes
-rw-r--r--tests/ref/base/color.png (renamed from tests/ref/utility/color.png)bin595 -> 595 bytes
-rw-r--r--tests/ref/base/data.png (renamed from tests/ref/utility/data.png)bin8603 -> 8603 bytes
-rw-r--r--tests/ref/base/eval.png (renamed from tests/ref/utility/eval.png)bin5429 -> 5429 bytes
-rw-r--r--tests/ref/base/numbering.png (renamed from tests/ref/utility/numbering.png)bin10634 -> 10634 bytes
-rw-r--r--tests/ref/base/string.png (renamed from tests/ref/utility/string.png)bin10614 -> 10614 bytes
-rw-r--r--tests/ref/layout/math.png (renamed from tests/ref/math/basic.png)bin6554 -> 6554 bytes
-rw-r--r--tests/ref/text/plain.png (renamed from tests/ref/text/basic.png)bin58344 -> 58344 bytes
-rw-r--r--tests/src/benches.rs3
-rw-r--r--tests/src/tests.rs5
-rw-r--r--tests/typ/base/assert.typ (renamed from tests/typ/utility/basics.typ)3
-rw-r--r--tests/typ/base/blind.typ (renamed from tests/typ/utility/blind.typ)0
-rw-r--r--tests/typ/base/calc.typ (renamed from tests/typ/utility/math.typ)0
-rw-r--r--tests/typ/base/collection.typ (renamed from tests/typ/utility/collection.typ)0
-rw-r--r--tests/typ/base/color.typ (renamed from tests/typ/utility/color.typ)0
-rw-r--r--tests/typ/base/data.typ (renamed from tests/typ/utility/data.typ)2
-rw-r--r--tests/typ/base/eval.typ (renamed from tests/typ/utility/eval.typ)0
-rw-r--r--tests/typ/base/string.typ (renamed from tests/typ/utility/string.typ)0
-rw-r--r--tests/typ/base/type.typ7
-rw-r--r--tests/typ/layout/math.typ (renamed from tests/typ/math/basic.typ)0
-rw-r--r--tests/typ/text/plain.typ (renamed from tests/typ/text/basic.typ)2
22 files changed, 13 insertions, 9 deletions
diff --git a/tests/ref/utility/blind.png b/tests/ref/base/blind.png
index e972567e..e972567e 100644
--- a/tests/ref/utility/blind.png
+++ b/tests/ref/base/blind.png
Binary files differ
diff --git a/tests/ref/utility/collection.png b/tests/ref/base/collection.png
index e93e2beb..e93e2beb 100644
--- a/tests/ref/utility/collection.png
+++ b/tests/ref/base/collection.png
Binary files differ
diff --git a/tests/ref/utility/color.png b/tests/ref/base/color.png
index 496013bb..496013bb 100644
--- a/tests/ref/utility/color.png
+++ b/tests/ref/base/color.png
Binary files differ
diff --git a/tests/ref/utility/data.png b/tests/ref/base/data.png
index 69e0ae38..69e0ae38 100644
--- a/tests/ref/utility/data.png
+++ b/tests/ref/base/data.png
Binary files differ
diff --git a/tests/ref/utility/eval.png b/tests/ref/base/eval.png
index 38c1d64e..38c1d64e 100644
--- a/tests/ref/utility/eval.png
+++ b/tests/ref/base/eval.png
Binary files differ
diff --git a/tests/ref/utility/numbering.png b/tests/ref/base/numbering.png
index d4d575d9..d4d575d9 100644
--- a/tests/ref/utility/numbering.png
+++ b/tests/ref/base/numbering.png
Binary files differ
diff --git a/tests/ref/utility/string.png b/tests/ref/base/string.png
index 02184316..02184316 100644
--- a/tests/ref/utility/string.png
+++ b/tests/ref/base/string.png
Binary files differ
diff --git a/tests/ref/math/basic.png b/tests/ref/layout/math.png
index 902354df..902354df 100644
--- a/tests/ref/math/basic.png
+++ b/tests/ref/layout/math.png
Binary files differ
diff --git a/tests/ref/text/basic.png b/tests/ref/text/plain.png
index bfdf47a2..bfdf47a2 100644
--- a/tests/ref/text/basic.png
+++ b/tests/ref/text/plain.png
Binary files differ
diff --git a/tests/src/benches.rs b/tests/src/benches.rs
index 3af2db6e..e3c276bc 100644
--- a/tests/src/benches.rs
+++ b/tests/src/benches.rs
@@ -2,13 +2,12 @@ use std::path::{Path, PathBuf};
use comemo::{Prehashed, Track, Tracked};
use iai::{black_box, main, Iai};
-use unscanny::Scanner;
-
use typst::diag::{FileError, FileResult};
use typst::font::{Font, FontBook};
use typst::syntax::{Source, SourceId, TokenMode, Tokens};
use typst::util::Buffer;
use typst::{Config, World};
+use unscanny::Scanner;
const TEXT: &str = include_str!("../typ/benches/bench.typ");
const FONT: &[u8] = include_bytes!("../../fonts/IBMPlexSans-Regular.ttf");
diff --git a/tests/src/tests.rs b/tests/src/tests.rs
index 620c1e7b..54afd034 100644
--- a/tests/src/tests.rs
+++ b/tests/src/tests.rs
@@ -11,9 +11,6 @@ use comemo::Prehashed;
use elsa::FrozenVec;
use once_cell::unsync::OnceCell;
use tiny_skia as sk;
-use unscanny::Scanner;
-use walkdir::WalkDir;
-
use typst::diag::{bail, FileError, FileResult};
use typst::font::{Font, FontBook};
use typst::frame::{Element, Frame};
@@ -24,6 +21,8 @@ use typst::util::{Buffer, PathExt};
use typst::{Config, World};
use typst_library::layout::PageNode;
use typst_library::text::{TextNode, TextSize};
+use unscanny::Scanner;
+use walkdir::WalkDir;
const TYP_DIR: &str = "typ";
const REF_DIR: &str = "ref";
diff --git a/tests/typ/utility/basics.typ b/tests/typ/base/assert.typ
index 83d192c4..b0c8aafd 100644
--- a/tests/typ/utility/basics.typ
+++ b/tests/typ/base/assert.typ
@@ -1,8 +1,7 @@
-// Test basic functions.
+// Test the `assert` function.
// Ref: false
---
-// Test the `assert` function.
#assert(1 + 1 == 2)
#assert(range(2, 5) == (2, 3, 4))
#assert(not false)
diff --git a/tests/typ/utility/blind.typ b/tests/typ/base/blind.typ
index 17452dec..17452dec 100644
--- a/tests/typ/utility/blind.typ
+++ b/tests/typ/base/blind.typ
diff --git a/tests/typ/utility/math.typ b/tests/typ/base/calc.typ
index 4ccefa22..4ccefa22 100644
--- a/tests/typ/utility/math.typ
+++ b/tests/typ/base/calc.typ
diff --git a/tests/typ/utility/collection.typ b/tests/typ/base/collection.typ
index 46ff97ab..46ff97ab 100644
--- a/tests/typ/utility/collection.typ
+++ b/tests/typ/base/collection.typ
diff --git a/tests/typ/utility/color.typ b/tests/typ/base/color.typ
index 96d76063..96d76063 100644
--- a/tests/typ/utility/color.typ
+++ b/tests/typ/base/color.typ
diff --git a/tests/typ/utility/data.typ b/tests/typ/base/data.typ
index e90c1b0d..96b12ff5 100644
--- a/tests/typ/utility/data.typ
+++ b/tests/typ/base/data.typ
@@ -10,7 +10,7 @@
#table(columns: data(0).len(), ..cells)
---
-// Error: 6-16 file not found (searched at typ/utility/nope.csv)
+// Error: 6-16 file not found (searched at typ/base/nope.csv)
#csv("nope.csv")
---
diff --git a/tests/typ/utility/eval.typ b/tests/typ/base/eval.typ
index 86b1f0c4..86b1f0c4 100644
--- a/tests/typ/utility/eval.typ
+++ b/tests/typ/base/eval.typ
diff --git a/tests/typ/utility/string.typ b/tests/typ/base/string.typ
index 3104a3ea..3104a3ea 100644
--- a/tests/typ/utility/string.typ
+++ b/tests/typ/base/string.typ
diff --git a/tests/typ/base/type.typ b/tests/typ/base/type.typ
new file mode 100644
index 00000000..37cf8623
--- /dev/null
+++ b/tests/typ/base/type.typ
@@ -0,0 +1,7 @@
+// Test the `type` function.
+// Ref: false
+
+---
+#test(type(1), "integer")
+#test(type(ltr), "direction")
+#test(type(10 / 3), "float")
diff --git a/tests/typ/math/basic.typ b/tests/typ/layout/math.typ
index 55a853cf..55a853cf 100644
--- a/tests/typ/math/basic.typ
+++ b/tests/typ/layout/math.typ
diff --git a/tests/typ/text/basic.typ b/tests/typ/text/plain.typ
index a074a046..34a2d626 100644
--- a/tests/typ/text/basic.typ
+++ b/tests/typ/text/plain.typ
@@ -1,4 +1,4 @@
-// Test simple text.
+// Test plain text.
---
#set page(width: 250pt, height: 120pt)