Added some more coloring to nant-color (especially for tests)

0.6.0-stable
Homer Horwitz 2008-11-02 13:13:45 +00:00
parent 499f1428f7
commit 9c8e4d0914
1 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,12 @@ def colorize(str)
str.sub!(/(Build Succeeded)/i, green('\1')) str.sub!(/(Build Succeeded)/i, green('\1'))
str.sub!(/(Compilation succeeded)/, green('\1')) str.sub!(/(Compilation succeeded)/, green('\1'))
str.sub!(/(\d+ warning\(s\))/, yellow('\1')) str.sub!(/(\d+ warning\(s\))/, yellow('\1'))
str.sub!(/(Build Failed)/i, red('\1'))
str.sub!(/(Tests run: \d+, Failures: 0, Not run: 0,.*)/, green('\1'))
str.sub!(/(Tests run: \d+, Failures: 0, Not run: [1-9].*)/, yellow('\1'))
str.sub!(/(Tests run: \d+, Failures: [1-9].*)/, red('\1'))
str.sub!(/(Test Case Failures:)/, red('\1'))
return str return str
end end