mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
- updated color handling by standardizing output
- cleaned up internal types - added verbose float support when sprintf is available and desirable - tested float array handling (and fixed a bug! woo!) git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@68 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
@@ -7,10 +7,11 @@ def report(message)
|
||||
if not $colour_output
|
||||
$stdout.puts(message)
|
||||
else
|
||||
message = message.join('\n') if (message.class == Array)
|
||||
message.each_line do |line|
|
||||
line.chomp!
|
||||
colour = case(line)
|
||||
when /Tests\s+(\d+)\s+Failures\s+\d+\s+Ignored/
|
||||
when /(?:total\s+)?tests:?\s+(\d+)\s+(?:total\s+)?failures:?\s+\d+\s+Ignored:?/i
|
||||
($1.to_i == 0) ? :green : :red
|
||||
when /PASS/
|
||||
:green
|
||||
@@ -23,7 +24,7 @@ def report(message)
|
||||
when /^(?:Creating|Compiling|Linking)/
|
||||
:white
|
||||
else
|
||||
:blue
|
||||
:silver
|
||||
end
|
||||
colour_puts(colour, line)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user