Skip to content

Commit 89879eb

Browse files
authored
Merge pull request #432 from epage/norm
fix(trycmd): Normalize expected newlines
2 parents 0cee16b + 82e37aa commit 89879eb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

crates/trycmd/src/runner.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,12 @@ impl Case {
473473
}
474474

475475
if let Some(expected_content) = expected_content {
476+
let expected_content = FilterNewlines.filter(expected_content.clone());
476477
stream.content = NormalizeToExpected::new()
477478
.redact_with(substitutions)
478-
.normalize(stream.content, expected_content);
479+
.normalize(stream.content, &expected_content);
479480

480-
if stream.content != *expected_content {
481+
if stream.content != expected_content {
481482
stream.status = StreamStatus::Expected(expected_content.clone());
482483
return Some(stream);
483484
}

0 commit comments

Comments
 (0)