YUKI Hiroshi
null+****@clear*****
Wed Nov 27 10:18:44 JST 2013
YUKI Hiroshi 2013-11-27 10:18:44 +0900 (Wed, 27 Nov 2013) New Revision: c6c6c414a8d0134ecbdd8337d6240e34c7e8f876 https://github.com/droonga/drntest/commit/c6c6c414a8d0134ecbdd8337d6240e34c7e8f876 Message: Accept boolean option given as "#@option-name" style Modified files: lib/drntest/test-runner.rb Modified: lib/drntest/test-runner.rb (+3 -2) =================================================================== --- lib/drntest/test-runner.rb 2013-11-26 19:36:06 +0900 (14b644b) +++ lib/drntest/test-runner.rb 2013-11-27 10:18:44 +0900 (01e8a72) @@ -200,9 +200,10 @@ module Drntest def load_options(path, options={}) options = {} Pathname(path).read.each_line do |line| - next unless /\A\#\@([^\s]+)\s+(.+)\n?\z/ =~ line + next unless /\A\#\@([^\s]+)(?:\s+(.+))?\n?\z/ =~ line key = $1.to_sym - value = $2 + # nil value means that it is a boolean option. + value = $2 || true if key == :include included = resolve_relative_path(value, options[:base_path] || base_path) included_options = load_options(included, -------------- next part -------------- HTML����������������������������...Download