From 46a299bceece6f8633d7c1518939efbb3a57fae3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 18 Dec 2019 15:33:36 +0100 Subject: Refactor goto tests to always specify texts --- crates/test_utils/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/test_utils/src') 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 { // 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("\\\\", "/").replace("\\", "/"); - let mut actual: &str = &actual.replace("\\\\", "/").replace("\\", "/"); + let expected = expected.replace(r"\\", "/").replace(r"\", "/"); + let mut actual: &str = &actual.replace(r"\\", "/").replace(r"\", "/"); for (i, part) in expected.split("[..]").enumerate() { match actual.find(part) { Some(j) => { -- cgit v1.2.3