aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/unittest.bash
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/shell/unittest.bash')
-rw-r--r--src/test/shell/unittest.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/shell/unittest.bash b/src/test/shell/unittest.bash
index fc2321afee..2430e928ec 100644
--- a/src/test/shell/unittest.bash
+++ b/src/test/shell/unittest.bash
@@ -426,8 +426,8 @@ function __trap_with_arg() {
# arguments need to be escaped.
function __log_to_test_report() {
local node="$1"
- local block="${2//\}/\\\}}"
-
+ # Escape '\', '{' and '}' character, since we are inlining the text in the perl expression.
+ local block=$(echo "$2" | sed -e 's/\([\{\}\\]\)/\\\1/g')
if [[ ! -e "$XML_OUTPUT_FILE" ]]; then
local xml_header='<?xml version="1.0" encoding="UTF-8"?>'
echo "$xml_header<testsuites></testsuites>" > $XML_OUTPUT_FILE