lib/turn/command.rb in turn-0.9.4 vs lib/turn/command.rb in turn-0.9.5

- old
+ new

@@ -74,10 +74,16 @@ attr :trace # Use natural test case names. attr :natural + # Show extra information. + attr :verbose + + # Show extra information. + attr :mark + # Force ANSI use on or off. attr :ansi # def initialize @@ -89,10 +95,12 @@ @requires = [] @runmode = nil @outmode = nil @trace = nil @natural = false + @verbose = false + @mark = nil @ansi = nil end # def option_parser @@ -129,18 +137,26 @@ else @matchcase = Regexp.new(pattern, Regexp::IGNORECASE) end end + opts.on('-m', '--mark=SECONDS', "Mark test if it exceeds runtime threshold.") do |int| + @mark = int.to_i + end + opts.on('-b', '--backtrace', '--trace INT', "Limit the number of lines of backtrace.") do |int| @trace = int end opts.on('--natural', "Show natualized test names.") do |bool| @natural = bool end + opts.on('-v', '--verbose', "Show extra information.") do |bool| + @verbose = bool + end + opts.on('--[no-]ansi', "Force use of ANSI codes on or off.") do |bool| @ansi = bool end # Turn does not support Test::Unit 2.0+ @@ -216,11 +232,11 @@ opts.on_tail('--version', "display version") do puts VERSION exit end - opts.on_tail('--help', '-h', "display this help information") do + opts.on_tail('-h', '--help', "display this help information") do puts opts exit end end end @@ -244,9 +260,11 @@ c.format = outmode c.pattern = pattern c.matchcase = matchcase c.trace = trace c.natural = natural + c.verbose = verbose + c.mark = mark c.ansi = ansi unless ansi.nil? end controller = Turn::Controller.new(config)