mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-09-07 18:59:58 +00:00
Protect against files without any test output
This commit is contained in:
@@ -97,7 +97,11 @@ class UnityToJUnit
|
|||||||
#use line[0] from the test output to get the test_file path and name
|
#use line[0] from the test output to get the test_file path and name
|
||||||
test_file_str = lines[0].gsub("\\","/")
|
test_file_str = lines[0].gsub("\\","/")
|
||||||
test_file_str = test_file_str.split(":")
|
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][:path] = File.dirname(test_file)
|
||||||
result_output[:source][:file] = File.basename(test_file)
|
result_output[:source][:file] = File.basename(test_file)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user