Permalink
Browse files

* test/optparse/test_summary.rb (test_summary_containing_space): add

  test for r35467. OptionParser#to_a shouldn't split banner by spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent df79ded commit 2bc4268e7900808b6965176a975c9d392a1239fa @nagachika nagachika committed Apr 25, 2012
Showing with 13 additions and 0 deletions.
  1. +5 −0 ChangeLog
  2. +8 −0 test/optparse/test_summary.rb
View
@@ -1,3 +1,8 @@
+Thu Apr 26 01:32:33 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * test/optparse/test_summary.rb (test_summary_containing_space): add
+ test for r35467. OptionParser#to_a shouldn't split banner by spaces.
+
Wed Apr 25 23:02:46 2012 Tanaka Akira <akr@fsij.org>
* ext/socket/raddrinfo.c (init_unix_addrinfo): refine error message
@@ -35,4 +35,12 @@ def test_summary
assert_equal("foo\nbar\n", o.to_s)
assert_equal(["foo\n", "bar"], o.to_a)
end
+
+ def test_summary_containing_space
+ # test for r35467. OptionParser#to_a shouldn't split str by spaces.
+ bug6348 = '[ruby-dev:45568]'
+ o = OptionParser.new("foo bar")
+ assert_equal("foo bar\n", o.to_s, bug6348)
+ assert_equal(["foo bar"], o.to_a, bug6348)
+ end
end

0 comments on commit 2bc4268

Please sign in to comment.