diff options
author | Aleksey Kladov <[email protected]> | 2019-12-18 14:33:36 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-18 15:00:35 +0000 |
commit | 46a299bceece6f8633d7c1518939efbb3a57fae3 (patch) | |
tree | f448be34142365f77b62b6f90b2c2bbd85f1adb4 /crates/test_utils/src | |
parent | 69c944a1e27212604ce85154fd40cff1d46ad6f3 (diff) |
Refactor goto tests to always specify texts
Diffstat (limited to 'crates/test_utils/src')
-rw-r--r-- | crates/test_utils/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs index 657ddf2a6..659f77b71 100644 --- a/crates/test_utils/src/lib.rs +++ b/crates/test_utils/src/lib.rs | |||
@@ -207,8 +207,8 @@ pub fn lines_match(expected: &str, actual: &str) -> bool { | |||
207 | // Let's not deal with / vs \ (windows...) | 207 | // Let's not deal with / vs \ (windows...) |
208 | // First replace backslash-escaped backslashes with forward slashes | 208 | // First replace backslash-escaped backslashes with forward slashes |
209 | // which can occur in, for example, JSON output | 209 | // which can occur in, for example, JSON output |
210 | let expected = expected.replace("\\\\", "/").replace("\\", "/"); | 210 | let expected = expected.replace(r"\\", "/").replace(r"\", "/"); |
211 | let mut actual: &str = &actual.replace("\\\\", "/").replace("\\", "/"); | 211 | let mut actual: &str = &actual.replace(r"\\", "/").replace(r"\", "/"); |
212 | for (i, part) in expected.split("[..]").enumerate() { | 212 | for (i, part) in expected.split("[..]").enumerate() { |
213 | match actual.find(part) { | 213 | match actual.find(part) { |
214 | Some(j) => { | 214 | Some(j) => { |