summaryrefslogtreecommitdiff
path: root/test/optparse
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-25 16:36:14 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-25 16:36:14 +0000
commit2bc4268e7900808b6965176a975c9d392a1239fa (patch)
tree4698ff95723ad27e8218c5e68d1d4f4dc47decb3 /test/optparse
parentdf79ded6911d3d3c65d53e71567f7d37c8148326 (diff)
* 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
Diffstat (limited to 'test/optparse')
-rw-r--r--test/optparse/test_summary.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/optparse/test_summary.rb b/test/optparse/test_summary.rb
index d777173..54fd194 100644
--- a/test/optparse/test_summary.rb
+++ b/test/optparse/test_summary.rb
@@ -35,4 +35,12 @@ class TestOptionParser::SummaryTest < TestOptionParser
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