1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
tadf 2012-11-22 12:36:22 +00:00
parent d6ec400148
commit b4f25e30df
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Thu Nov 22 21:34:51 2012 Tadayoshi Funaba <tadf@dotrb.org>
* test/ruby/test_rubyoptions.rb: added a test.
Thu Nov 22 20:32:07 2012 Tadayoshi Funaba <tadf@dotrb.org>
* complex.c (string_to_c_strict, string_to_c): check NUL.

View file

@ -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)