Verified Commit 4bad0c4d authored by Camil Staps's avatar Camil Staps 🙂

Use new escapeFor{Attribute,TextNode}

parent 1983f936
Pipeline #40136 passed with stage
in 1 minute and 11 seconds
......@@ -121,7 +121,7 @@ where
printTestSuite :: !JUnitSuite !*File -> *File
printTestSuite jus f
# f = f <<< "\t<testsuite name=\"" <<< escapeStr jus.jus_name
# f = f <<< "\t<testsuite name=\"" <<< escapeForAttribute jus.jus_name
<<< "\" tests=\"" <<< jus.jus_tests
<<< "\" failures=\"" <<< jus.jus_failures
<<< "\" time=\"" <<< time jus.jus_time
......@@ -131,19 +131,19 @@ where
= f
printProperty :: !(!String,!String) !*File -> *File
printProperty (key,val) f = f <<< "\t\t\t<property name=\"" <<< escapeStr key
<<< "\" value=\"" <<< escapeStr val
printProperty (key,val) f = f <<< "\t\t\t<property name=\"" <<< escapeForAttribute key
<<< "\" value=\"" <<< escapeForAttribute val
<<< "\"?>\n"
printTestCase :: !JUnitCase !*File -> *File
printTestCase juc f
# f = f <<< "\t\t<testcase id=\"" <<< escapeStr juc.juc_id
<<< "\" name=\"" <<< escapeStr juc.juc_name
<<< "\" classname=\"" <<< escapeStr juc.juc_classname
# f = f <<< "\t\t<testcase id=\"" <<< escapeForAttribute juc.juc_id
<<< "\" name=\"" <<< escapeForAttribute juc.juc_name
<<< "\" classname=\"" <<< escapeForAttribute juc.juc_classname
<<< "\" time=\"" <<< time juc.juc_time
<<< "\">"
# f = case juc.juc_failure of
Nothing -> f
Just r -> f <<< "\n\t\t\t<failure>" <<< escapeStr r <<< "</failure>\n\t\t"
Just r -> f <<< "\n\t\t\t<failure>" <<< escapeForTextNode r <<< "</failure>\n\t\t"
# f = f <<< "</testcase>\n"
= f
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment