Sha256: 94702f2274bed1bb3addf674b302daa3341984d3e0eb87c4e47a507d489f7981

Contents?: true

Size: 1.37 KB

Versions: 15

Compression:

Stored size: 1.37 KB

Contents

module Test
  module Unit
    AutoRunner.register_runner(:console) do |auto_runner|
      require 'test/unit/ui/console/testrunner'
      Test::Unit::UI::Console::TestRunner
    end

    AutoRunner.setup_option do |auto_runner, opts|
      require 'test/unit/ui/console/outputlevel'

      output_levels = [
        [:silent, UI::Console::OutputLevel::SILENT],
        [:progress, UI::Console::OutputLevel::PROGRESS_ONLY],
        [:normal, UI::Console::OutputLevel::NORMAL],
        [:verbose, UI::Console::OutputLevel::VERBOSE],
      ]
      opts.on('-v', '--verbose=[LEVEL]', output_levels,
              "Set the output level (default is verbose).",
              "(#{auto_runner.keyword_display(output_levels)})") do |level|
        level ||= output_levels.assoc(:verbose)[1]
        auto_runner.runner_options[:output_level] = level
      end

      use_color_options = [
        [:auto, :auto],
        ["-", false],
        ["no", false],
        ["false", false],
        ["+", true],
        ["yes", true],
        ["true", true],
      ]
      opts.on("--[no-]use-color=[auto]", use_color_options,
              "Use color output",
              "(default is auto") do |use_color|
        case use_color
        when nil
          use_color = true
        when :auto
          use_color = nil
        end
        auto_runner.runner_options[:use_color] = use_color
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
cairo-1.8.5-x86-mingw32 test-unit/lib/test/unit/runner/console.rb
cairo-1.8.5 test-unit/lib/test/unit/runner/console.rb
cairo-1.8.4 test-unit/lib/test/unit/runner/console.rb
cairo-1.8.4-x86-mingw32 test-unit/lib/test/unit/runner/console.rb
cairo-1.8.3-x86-mingw32 test-unit/lib/test/unit/runner/console.rb
cairo-1.8.3 test-unit/lib/test/unit/runner/console.rb
cairo-1.8.1-x86-mswin32 test-unit/lib/test/unit/runner/console.rb
cairo-1.8.1 test-unit/lib/test/unit/runner/console.rb
activeldap-1.0.1 test-unit/lib/test/unit/runner/console.rb
activesambaldap-0.0.6 test-unit/lib/test/unit/runner/console.rb
cairo-1.7.0-x86-mswin32 test-unit/lib/test/unit/runner/console.rb
cairo-1.7.0 test-unit/lib/test/unit/runner/console.rb
cairo-1.8.0-x86-mswin32 test-unit/lib/test/unit/runner/console.rb
cairo-1.8.0 test-unit/lib/test/unit/runner/console.rb
test-unit-2.0.0 lib/test/unit/runner/console.rb