null+****@clear*****
null+****@clear*****
2012年 5月 16日 (水) 11:27:43 JST
HAYASHI Kentaro 2012-05-16 11:27:43 +0900 (Wed, 16 May 2012) New Revision: 40480d22436061d8655148c8584d855b3f4feffc Log: test: rename variable name to proper one opt-> parser Modified files: test/function/tools/geo/generate-grntest-data.rb Modified: test/function/tools/geo/generate-grntest-data.rb (+8 -8) =================================================================== --- test/function/tools/geo/generate-grntest-data.rb 2012-05-16 11:22:08 +0900 (e72185f) +++ test/function/tools/geo/generate-grntest-data.rb 2012-05-16 11:27:43 +0900 (9ab8aca) @@ -215,14 +215,14 @@ end if __FILE__ == $0 OPTS = {} - opt = OptionParser.new - opt.on('-g', '--generate-filename'){ |v| OPTS[:name] = v } - opt.on('-t', '--generate-test'){ |v| OPTS[:test] = v } - opt.on('-e', '--generate-expected'){ |v| OPTS[:expected] = v } - opt.on('-c [VAL]', '--csv [VAL]'){ |v| OPTS[:csv] = v } - opt.on('-v', '--verbose'){ |v| OPTS[:verbose] = v } - - opt.parse!(ARGV) + parser = OptionParser.new + parser.on('-g', '--generate-filename'){ |v| OPTS[:name] = v } + parser.on('-t', '--generate-test'){ |v| OPTS[:test] = v } + parser.on('-e', '--generate-expected'){ |v| OPTS[:expected] = v } + parser.on('-c [VAL]', '--csv [VAL]'){ |v| OPTS[:csv] = v } + parser.on('-v', '--verbose'){ |v| OPTS[:verbose] = v } + + parser.parse!(ARGV) exit if not OPTS.has_key? :csv