From 0d85a1ef53e98cdfb060e02d029b2637e3b1e79a Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 11 Jan 2019 09:48:45 -0800 Subject: [PATCH] Exclude final newlines from inputs when parsing corpus files --- cli/src/test.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/src/test.rs b/cli/src/test.rs index 790e9ec7..e064dffd 100644 --- a/cli/src/test.rs +++ b/cli/src/test.rs @@ -16,7 +16,7 @@ lazy_static! { .multi_line(true) .build() .unwrap(); - static ref DIVIDER_REGEX: ByteRegex = ByteRegexBuilder::new(r"^---+\r?\n") + static ref DIVIDER_REGEX: ByteRegex = ByteRegexBuilder::new(r"\r?\n---+\r?\n") .multi_line(true) .build() .unwrap(); @@ -251,12 +251,12 @@ d children: vec![ TestEntry::Example { name: "The first test".to_string(), - input: "\na b c\n\n".as_bytes().to_vec(), + input: "\na b c\n".as_bytes().to_vec(), output: "(a (b c))".to_string(), }, TestEntry::Example { name: "The second test".to_string(), - input: "d\n".as_bytes().to_vec(), + input: "d".as_bytes().to_vec(), output: "(d)".to_string(), }, ]