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.
This commit is contained in:
Martin von Zweigbergk 2022-03-01 22:20:07 -08:00 committed by Martin von Zweigbergk
parent fbd376df43
commit b1301fd761

View file

@ -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();