Skip to content

Commit b8dd70f

Browse files
authored
CI fix a bug in run-tests.sh (#1159)
1 parent a252d50 commit b8dd70f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

regression-tests/run-tests.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ report_diff () {
2828
if [[ -n "$diff_output" ]]; then
2929
echo " $error_msg:"
3030
echo " $file"
31-
printf "\n$diff_output\n\n" | tee -a "$patch_file"
31+
# $diff_output cannot be put directly in the format string
32+
# Otherwise \ might be interpreted as an escape character
33+
printf "\n%s\n\n" "$diff_output" | tee -a "$patch_file"
3234
failure=1
3335
fi
3436
}
@@ -70,8 +72,7 @@ check_file () {
7072
report_diff "$file" \
7173
"Non-matching $description" \
7274
"$patch_file" \
73-
--ignore-cr-at-eol \
74-
--ignore-matching-lines="C:\\\\"
75+
--ignore-cr-at-eol
7576
fi
7677
}
7778

regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';'
1414
pure2-assert-expected-not-null.cpp2(14): error C2039: 'unexpected': is not a member of 'std'
1515
predefined C++ types (compiler internal)(347): note: see declaration of 'std'
1616
pure2-assert-expected-not-null.cpp2(14): error C2660: 'unexpected': function does not take 1 arguments
17-
C:\Program Files\Microsoft Visual Studio�2nterprise\VC\Tools\MSVC .40.33807\includeh.h(33): note: see declaration of 'unexpected'
17+
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.40.33807\include\eh.h(33): note: see declaration of 'unexpected'
1818
pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argument list '(bool)'
1919
pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}'
2020
pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier

0 commit comments

Comments
 (0)