Sha256: 2ea16e4a72decb309aea17b06aa0a9f583e20e95e43cd2f8492e512de10e6029

Contents?: true

Size: 1.04 KB

Versions: 46

Compression:

Stored size: 1.04 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

46 entries across 27 versions & 3 rubygems

Version Path
ceedling-0.20.2 vendor/unity/auto/colour_reporter.rb
ceedling-0.20.2 vendor/c_exception/vendor/unity/auto/colour_reporter.rb
ceedling-0.20.2 vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb
ceedling-0.20.2 vendor/cmock/vendor/unity/auto/colour_reporter.rb
ceedling-0.19.0 vendor/cmock/vendor/unity/auto/colour_reporter.rb
ceedling-0.19.0 vendor/unity/auto/colour_reporter.rb
acpc_dealer-2.4.1 vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb
acpc_dealer-2.4.0 vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb
acpc_dealer-2.3.6 vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb
acpc_dealer-2.3.5 vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb
acpc_dealer-2.3.4 vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb
acpc_dealer-2.3.3 vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb
acpc_dealer-2.3.2 vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb
acpc_dealer-2.3.1 vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb
acpc_dealer-2.3.0 vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb
acpc_dealer-2.2.0 vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb
c_project-0.2.3 templates/c/vendor/unity/auto/colour_reporter.rb
c_project-0.2.2 templates/c/vendor/unity/auto/colour_reporter.rb
c_project-0.2.1 templates/c/vendor/unity/auto/colour_reporter.rb
c_project-0.2.0 templates/c/vendor/unity/auto/colour_reporter.rb