From b4f25e30dfbf4c8346a9c99e359bd9f240d5c72f Mon Sep 17 00:00:00 2001 From: tadf Date: Thu, 22 Nov 2012 12:36:22 +0000 Subject: * test/ruby/test_rubyoptions.rb: added a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rubyoptions.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 47baa691c9..c77aa1f3dd 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -33,6 +33,17 @@ class TestRubyOptions < Test::Unit::TestCase end end + def test_usage2 + assert_in_out_err(%w(-h)) do |r, e| + assert_operator(r[1..-1].collect{|x| x.size}.max, :<=, 80) + assert_equal([], e) + end + assert_in_out_err(%w(--help)) do |r, e| + assert_operator(r[1..-1].collect{|x| x.size}.max, :<=, 80) + assert_equal([], e) + end + end + def test_option_variables assert_in_out_err(["-e", 'p [$-p, $-l, $-a]']) do |r, e| assert_equal(["[false, false, false]"], r) -- cgit v1.2.3