mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Handle backslash-escaped backslashes
This commit is contained in:
parent
104ab6c2bc
commit
b088539de8
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user