Sha256: a1a7a1746da979521d39b910b7f139068b60afa4ae1e3604918943360866de61

Contents?: true

Size: 1014 Bytes

Versions: 15

Compression:

Stored size: 1014 Bytes

Contents

#!/usr/bin/env ruby
require 'rubygems'; require 'require_relative'
require_relative './mock-helper'
require_relative '../../processor/command/source'

# Test command source
class TestCommandSource < Test::Unit::TestCase

  include MockUnitHelper
  def setup
    @name = File.basename(__FILE__, '.rb').split(/-/)[2]
    common_setup(@name)
  end

  def test_source_opts

  [['--quiet',       :verbose, false],
   ['-q',            :quiet, true],
   ['--no-quiet',    :quiet, false],
   ['--continue',    :abort_on_error, false],
   ['--no-continue', :abort_on_error, true],
   ['-c',            :abort_on_error, false],
   ['-v',            :verbose, true],
   ['--verbose',     :verbose, true],
   ['--no-verbose',  :verbose, false]
  ].each do |opt, key, expect|
      options = 
        @cmd.parse_options(Trepan::Command::SourceCommand::DEFAULT_OPTIONS.dup,
                           opt)
      assert_equal(expect, options[key], 
                   "Option #{opt} using key #{key} failure")
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
rbx-trepanning-0.2.1-universal-rubinius-2.0 test/unit/test-cmd-source.rb
rbx-trepanning-0.2.1-universal-rubinius-1.2 test/unit/test-cmd-source.rb
rbx-trepanning-0.2.0-universal-rubinius-2.0 test/unit/test-cmd-source.rb
rb8-trepanning-0.1.6 test/unit/test-cmd-source.rb
rb8-trepanning-0.1.5 test/unit/test-cmd-source.rb
rbx-trepanning-0.1.0-universal-rubinius-1.2 test/unit/test-cmd-source.rb
rb8-trepanning-0.1.4 test/unit/test-cmd-source.rb
rb8-trepanning-0.1.3 test/unit/test-cmd-source.rb
rb8-trepanning-0.1.3-universal-ruby-1.9.2 test/unit/test-cmd-source.rb
rb8-trepanning-0.1.3-universal-ruby-1.8.7 test/unit/test-cmd-source.rb
rbx-trepanning-0.0.8-universal-rubinius-1.2 test/unit/test-cmd-source.rb
rbx-trepanning-0.0.7-universal-rubinius-1.2 test/unit/test-cmd-source.rb
rbx-trepanning-0.0.6-universal-rubinius-1.2 test/unit/test-cmd-source.rb
rbx-trepanning-0.0.5-universal-rubinius-1.2.1 test/unit/test-cmd-source.rb
rbx-trepanning-0.0.4-universal-rubinius-1.2 test/unit/test-cmd-source.rb