Kill alive mutations in Mutant::CLI

This commit is contained in:
Markus Schirp 2015-05-02 22:01:10 +00:00
parent 87284a368e
commit ccb9c14af7
2 changed files with 5 additions and 5 deletions

View file

@ -1,3 +1,3 @@
--- ---
threshold: 18 threshold: 18
total_score: 1215 total_score: 1218

View file

@ -66,13 +66,13 @@ module Mutant
opts = OptionParser.new do |builder| opts = OptionParser.new do |builder|
builder.banner = 'usage: mutant [options] MATCH_EXPRESSION ...' builder.banner = 'usage: mutant [options] MATCH_EXPRESSION ...'
%w[add_environment_options add_mutation_options add_filter_options add_debug_options].each do |name| %w[add_environment_options add_mutation_options add_filter_options add_debug_options].each do |name|
send(name, builder) __send__(name, builder)
end end
end end
parse_match_expressions(opts.parse!(arguments)) parse_match_expressions(opts.parse!(arguments))
rescue OptionParser::ParseError => error rescue OptionParser::ParseError => error
raise(Error, error.message, error.backtrace) raise(Error, error)
end end
# Parse matchers # Parse matchers
@ -140,7 +140,7 @@ module Mutant
# @api private # @api private
# #
def add_mutation_options(opts) def add_mutation_options(opts)
opts.separator(EMPTY_STRING) opts.separator(nil)
opts.separator('Options:') opts.separator('Options:')
opts.on('--score COVERAGE', 'Fail unless COVERAGE is not reached exactly') do |coverage| opts.on('--score COVERAGE', 'Fail unless COVERAGE is not reached exactly') do |coverage|
@ -179,7 +179,7 @@ module Mutant
update(fail_fast: true) update(fail_fast: true)
end end
opts.on('--version', 'Print mutants version') do opts.on('--version', 'Print mutants version') do
puts("mutant-#{Mutant::VERSION}") puts("mutant-#{VERSION}")
Kernel.exit(EXIT_SUCCESS) Kernel.exit(EXIT_SUCCESS)
end end
opts.on('-d', '--debug', 'Enable debugging output') do opts.on('-d', '--debug', 'Enable debugging output') do