[前][次][番号順一覧][スレッド一覧]

ruby-changes:23422

From: nagachika <ko1@a...>
Date: Thu, 26 Apr 2012 01:36:56 +0900 (JST)
Subject: [ruby-changes:23422] nagachika:r35473 (trunk): * test/optparse/test_summary.rb (test_summary_containing_space): add

nagachika	2012-04-26 01:36:14 +0900 (Thu, 26 Apr 2012)

  New Revision: 35473

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35473

  Log:
    * test/optparse/test_summary.rb (test_summary_containing_space): add
      test for r35467. OptionParser#to_a shouldn't split banner by spaces.

  Modified files:
    trunk/ChangeLog
    trunk/test/optparse/test_summary.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 35472)
+++ ChangeLog	(revision 35473)
@@ -1,3 +1,8 @@
+Thu Apr 26 01:32:33 2012  CHIKANAGA Tomoyuki  <nagachika00@g...>
+
+	* 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@f...>
 
 	* ext/socket/raddrinfo.c (init_unix_addrinfo): refine error message
Index: test/optparse/test_summary.rb
===================================================================
--- test/optparse/test_summary.rb	(revision 35472)
+++ test/optparse/test_summary.rb	(revision 35473)
@@ -35,4 +35,12 @@
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]