diff --git a/auto/stylize_as_junit.rb b/auto/stylize_as_junit.rb index e52917e..27ac76d 100644 --- a/auto/stylize_as_junit.rb +++ b/auto/stylize_as_junit.rb @@ -97,7 +97,11 @@ class UnityToJUnit #use line[0] from the test output to get the test_file path and name test_file_str = lines[0].gsub("\\","/") test_file_str = test_file_str.split(":") - test_file = test_file_str[0] + ':' + test_file_str[1] + test_file = if (test_file_str.length < 2) + result_file + else + test_file_str[0] + ':' + test_file_str[1] + end result_output[:source][:path] = File.dirname(test_file) result_output[:source][:file] = File.basename(test_file)