Sha256: 3f12cae927d5451424a792ac22d991d2b80a93219f89702943077647174c262c

Contents?: true

Size: 1.07 KB

Versions: 27

Compression:

Stored size: 1.07 KB

Contents

# ==========================================
#   Unity Project - A Test Framework for C
#   Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
#   [Released under MIT License. Please refer to license.txt for details]
# ========================================== 

require "#{File.expand_path(File.dirname(__FILE__))}/colour_prompt"

$colour_output = true

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 /(?:total\s+)?tests:?\s+(\d+)\s+(?:total\s+)?failures:?\s+\d+\s+Ignored:?/i
          ($1.to_i == 0) ? :green : :red
        when /PASS/
          :green
        when /^OK$/
          :green
        when /(?:FAIL|ERROR)/
          :red
        when /IGNORE/
          :yellow
        when /^(?:Creating|Compiling|Linking)/
          :white
        else
          :silver
      end
      colour_puts(colour, line)
    end
  end
  $stdout.flush
  $stderr.flush
end

Version data entries

27 entries across 15 versions & 1 rubygems

Version Path
ceedling-0.19.0 vendor/c_exception/vendor/unity/auto/colour_reporter.rb
ceedling-0.19.0 vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb
ceedling-0.18.0 vendor/unity/auto/colour_reporter.rb
ceedling-0.17.0 vendor/unity/auto/colour_reporter.rb
ceedling-0.16.0 vendor/unity/auto/colour_reporter.rb
ceedling-0.15.6 vendor/unity/auto/colour_reporter.rb
ceedling-0.15.5 vendor/unity/auto/colour_reporter.rb
ceedling-0.15.4 vendor/unity/auto/colour_reporter.rb
ceedling-0.15.3 vendor/unity/auto/colour_reporter.rb
ceedling-0.15.2 vendor/unity/auto/colour_reporter.rb
ceedling-0.15.1 vendor/cmock/vendor/unity/auto/colour_reporter.rb
ceedling-0.15.1 vendor/c_exception/vendor/unity/auto/colour_reporter.rb
ceedling-0.15.1 vendor/unity/auto/colour_reporter.rb
ceedling-0.15.0 vendor/cmock/vendor/unity/auto/colour_reporter.rb
ceedling-0.15.0 vendor/unity/auto/colour_reporter.rb
ceedling-0.15.0 vendor/c_exception/vendor/unity/auto/colour_reporter.rb
ceedling-0.13.0 vendor/unity/auto/colour_reporter.rb
ceedling-0.13.0 vendor/c_exception/vendor/unity/auto/colour_reporter.rb
ceedling-0.13.0.rc1 vendor/unity/auto/colour_reporter.rb
ceedling-0.0.2 new_project_template/vendor/ceedling/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb