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