1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Protect against files without any test output

This commit is contained in:
Mark VanderVoord
2016-05-18 07:31:17 -04:00
parent d86a44b501
commit 7c3d829070

View File

@@ -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)