diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-22 12:36:22 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-22 12:36:22 +0000 |
commit | b4f25e30dfbf4c8346a9c99e359bd9f240d5c72f (patch) | |
tree | 69a2583a49b495504852b1dec24b13c28998dcb4 /test | |
parent | d6ec400148f58061118917fb5ed3977425244f0d (diff) | |
download | ruby-b4f25e30dfbf4c8346a9c99e359bd9f240d5c72f.tar.gz |
* 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
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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) |