From 474d2018007b28abc41900f3606592c308b5443a Mon Sep 17 00:00:00 2001 From: Alex Overchenko Date: Fri, 27 Nov 2020 11:40:47 +0300 Subject: [PATCH] parse_output: test names can contain double-quoted string now --- auto/parse_output.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/auto/parse_output.rb b/auto/parse_output.rb index f0c062b..6d9b17c 100644 --- a/auto/parse_output.rb +++ b/auto/parse_output.rb @@ -57,6 +57,10 @@ class ParseOutput puts 'Real test suite name will be \'' + @real_test_suite_name + '\'' end + def xml_encode_s(s) + return s.encode(:xml => :attr) + end + # If write our output to XML def write_xml_output output = File.open('report.xml', 'w') @@ -69,7 +73,7 @@ class ParseOutput # Pushes the suite info as xml to the array list, which will be written later def push_xml_output_suite_info # Insert opening tag at front - heading = '' + heading = '' @array_list.insert(0, heading) # Push back the closing tag @array_list.push '' @@ -77,19 +81,19 @@ class ParseOutput # Pushes xml output data to the array list, which will be written later def push_xml_output_passed(test_name) - @array_list.push ' ' + @array_list.push ' ' end # Pushes xml output data to the array list, which will be written later def push_xml_output_failed(test_name, reason) - @array_list.push ' ' + @array_list.push ' ' @array_list.push ' ' + reason + '' @array_list.push ' ' end # Pushes xml output data to the array list, which will be written later def push_xml_output_ignored(test_name, reason) - @array_list.push ' ' + @array_list.push ' ' @array_list.push ' ' + reason + '' @array_list.push ' ' end