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

- centralized pretty printing so people can use it more easily

- updated unity helper examples to get them working again
- got examples running again

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@65 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
mvandervoord
2010-03-21 02:53:17 +00:00
parent 07d2848dd4
commit b10a094214
11 changed files with 72 additions and 136 deletions

33
auto/colour_reporter.rb Normal file
View File

@@ -0,0 +1,33 @@
require "#{File.expand_path(File.dirname(__FILE__))}/colour_prompt"
$colour_output = true
def report(message)
if not $colour_output
$stdout.puts(message)
else
message.each_line do |line|
line.chomp!
colour = case(line)
when /Tests\s+(\d+)\s+Failures\s+\d+\s+Ignored/
($1.to_i == 0) ? :green : :red
when /PASS/
:green
when /^OK$/
:green
when /FAIL/
:red
when /IGNORE/
:yellow
when /^(Creating|Compiling|Linking)/
:white
else
:blue
end
colour_puts(colour, line)
end
end
$stdout.flush
$stderr.flush
end