summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-06-29 16:05:05 +0200
committerLaurenz <laurmaedje@gmail.com>2021-06-29 16:05:05 +0200
commit2f44d10aa4209b226cfc3d0f8f2c8516005edf6a (patch)
tree26e5609c1db3a2b89d07789d5568ed77169b5b66
parent8ea05739afdbe84fc50fe97d780cc6096d8df03d (diff)
Make test separators commentable
-rw-r--r--tests/ref/markup/shorthands.pngbin2122 -> 2621 bytes
-rw-r--r--tests/typ/code/block-invalid.typ2
-rw-r--r--tests/typ/code/call-invalid.typ2
-rw-r--r--tests/typ/markup/shorthands.typ3
-rw-r--r--tests/typeset.rs4
5 files changed, 6 insertions, 5 deletions
diff --git a/tests/ref/markup/shorthands.png b/tests/ref/markup/shorthands.png
index 3a5652ac..0a7e4064 100644
--- a/tests/ref/markup/shorthands.png
+++ b/tests/ref/markup/shorthands.png
Binary files differ
diff --git a/tests/typ/code/block-invalid.typ b/tests/typ/code/block-invalid.typ
index ba3f02d3..7116e86a 100644
--- a/tests/typ/code/block-invalid.typ
+++ b/tests/typ/code/block-invalid.typ
@@ -29,7 +29,7 @@
---
// Ref: false
-// Error: 3:1 expected closing brace
+// Error: 2:1 expected closing brace
{
---
diff --git a/tests/typ/code/call-invalid.typ b/tests/typ/code/call-invalid.typ
index f5a5adc3..34aa092d 100644
--- a/tests/typ/code/call-invalid.typ
+++ b/tests/typ/code/call-invalid.typ
@@ -26,7 +26,7 @@
// Error: 1-3 expected function, found string
#x()
-// Error: 3:1 expected closing bracket
+// Error: 2:1 expected closing bracket
#args[`a]`
---
diff --git a/tests/typ/markup/shorthands.typ b/tests/typ/markup/shorthands.typ
index 38471c9d..ef0bf866 100644
--- a/tests/typ/markup/shorthands.typ
+++ b/tests/typ/markup/shorthands.typ
@@ -4,4 +4,5 @@
The non-breaking~space does work.
---
-En dash: --
+- En dash: --
+- Em dash: ---
diff --git a/tests/typeset.rs b/tests/typeset.rs
index 31da3ce0..1540164f 100644
--- a/tests/typeset.rs
+++ b/tests/typeset.rs
@@ -146,7 +146,7 @@ fn test(
let mut compare_ref = true;
let mut compare_ever = false;
- let parts: Vec<_> = src.split("---").collect();
+ let parts: Vec<_> = src.split("\n---").collect();
for (i, part) in parts.iter().enumerate() {
let is_header = i == 0
&& parts.len() > 1
@@ -168,7 +168,7 @@ fn test(
frames.extend(part_frames);
}
- lines += part.lines().count() as u32;
+ lines += part.lines().count() as u32 + 1;
}
if compare_ever {