From b1301fd7612e6c538770187616e29067180e1be3 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Tue, 1 Mar 2022 22:20:07 -0800 Subject: [PATCH] tests: work around intellij-rust/intellij-rust#5368 The new `.editorconfig` tells editors to strip trailing whitespace, but IntelliJ has a bug where it strips trailing whitespace even inside multi-line strings. We can work around it in the cases we have because they're regexes, so `[ ]` works as a space. --- tests/smoke_test.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/smoke_test.rs b/tests/smoke_test.rs index 85b9ae222..18a97b391 100644 --- a/tests/smoke_test.rs +++ b/tests/smoke_test.rs @@ -28,8 +28,8 @@ fn smoke_test() { assert_eq!(output.status, 0); let stdout_string = output.stdout_string(); let output_regex = Regex::new( - "^Parent commit: 000000000000 -Working copy : ([[:xdigit:]]+) + "^Parent commit: 000000000000[ ] +Working copy : ([[:xdigit:]]+)[ ] The working copy is clean $", ) @@ -56,8 +56,8 @@ $", assert_eq!(output.status, 0); let stdout_string = output.stdout_string(); let output_regex = Regex::new( - "^Parent commit: 000000000000 -Working copy : ([[:xdigit:]]+) + "^Parent commit: 000000000000[ ] +Working copy : ([[:xdigit:]]+)[ ] Working copy changes: A file1 A file2 @@ -106,7 +106,7 @@ $", assert_eq!(output.status, 0); let stdout_string = output.stdout_string(); let output_regex = Regex::new( - "^Working copy now at: [[:xdigit:]]+ + "^Working copy now at: [[:xdigit:]]+[ ] $", ) .unwrap();