From 2f44d10aa4209b226cfc3d0f8f2c8516005edf6a Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 29 Jun 2021 16:05:05 +0200 Subject: Make test separators commentable --- tests/ref/markup/shorthands.png | Bin 2122 -> 2621 bytes tests/typ/code/block-invalid.typ | 2 +- tests/typ/code/call-invalid.typ | 2 +- tests/typ/markup/shorthands.typ | 3 ++- tests/typeset.rs | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/ref/markup/shorthands.png b/tests/ref/markup/shorthands.png index 3a5652ac..0a7e4064 100644 Binary files a/tests/ref/markup/shorthands.png and b/tests/ref/markup/shorthands.png 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 { -- cgit v1.2.3