Skip to content

Commit

Permalink
Escape quotes for JSON report passing regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
uyha committed Jul 29, 2023
1 parent 6c0d93e commit 1b95cd1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,8 @@ foreach (reporterName # "Automake" - the simple .trs format does not support any
# Different regex for these two reporters, because the commas end up xml-escaped
if (reporterName MATCHES "JUnit|XML")
set(testCaseNameFormat ""CaseInsensitiveLess is case insensitive"")
elseif(reporterName MATCHES "JSON")
set(testCaseNameFormat "\\\\\"CaseInsensitiveLess is case insensitive\\\\\"")
else()
set(testCaseNameFormat "\"CaseInsensitiveLess is case insensitive\"")
endif()
Expand Down

0 comments on commit 1b95cd1

Please sign in to comment.