summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb11
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)