YUKI Hiroshi
null+****@clear*****
Tue Nov 26 15:40:17 JST 2013
YUKI Hiroshi 2013-11-26 15:40:17 +0900 (Tue, 26 Nov 2013) New Revision: 69f2d586369a0849e8e8048e798bae6e7eb4169b https://github.com/droonga/drntest/commit/69f2d586369a0849e8e8048e798bae6e7eb4169b Message: Accept multiple values for "#@command" comments (but only the last value is used for most options) Modified files: lib/drntest/test-runner.rb Modified: lib/drntest/test-runner.rb (+14 -6) =================================================================== --- lib/drntest/test-runner.rb 2013-11-26 15:35:11 +0900 (1c31650) +++ lib/drntest/test-runner.rb 2013-11-26 15:40:17 +0900 (9192666) @@ -69,24 +69,30 @@ module Drntest end def port - @port || @options[:port] || @owner.port + return @port if @port + return @options[:port].last if @options[:port] + @owner.port end def host - @host || @options[:host] || @owner.host + return @host if @host + return @options[:host].last if @options[:host] + @owner.host end def tag - @tag || @options[:tag] || @owner.tag + return @tag if @tag + return @options[:tag].last if @options[:tag] + @owner.tag end private def prepare self.config =****@owner***** if****@owner***** - self.config = @options[:config] if @options[:config] + self.config = @options[:config].last if @options[:config] @catalog =****@owner***** if****@owner***** - @catalog = @options[:catalog] if @options[:catalog] + @catalog = @options[:catalog].last if @options[:catalog] if catalog && catalog.exist? catalog_json = JSON.parse(catalog.read, :symbolize_names => true) @@ -180,7 +186,9 @@ module Drntest options = {} @target_path.read.each_line do |line| next unless /\A\#\@([^\s]+)\s+(.+)\n?\z/ =~ line - options[$1.to_sym] = $2 + key = $1.to_sym + options[key] ||= [] + options[key] << $2 end options end -------------- next part -------------- HTML����������������������������... Download