Skip to content

Commit

Permalink
Handle backslash-escaped backslashes
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Nov 18, 2018
1 parent 104ab6c commit b088539
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/testsuite/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,9 @@ enum MatchKind {
/// See `substitute_macros` for a complete list of macros.
pub fn lines_match(expected: &str, actual: &str) -> bool {
// Let's not deal with / vs \ (windows...)
// First replace backslash-escaped backslashes with forward slashes
// which can occur in, for example, JSON output
let expected = expected.replace("\\\\", "/");
let expected = expected.replace("\\", "/");
let mut actual: &str = &actual.replace("\\", "/");
let expected = substitute_macros(&expected);
Expand Down

0 comments on commit b088539

Please sign in to comment.