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

ruby-changes:3106

From: ko1@a...
Date: 24 Dec 2007 18:53:23 +0900
Subject: [ruby-changes:3106] akr - Ruby:r14598 (trunk): add succ tests from the succ document.

akr	2007-12-24 18:53:08 +0900 (Mon, 24 Dec 2007)

  New Revision: 14598

  Modified files:
    trunk/test/ruby/test_string.rb

  Log:
    add succ tests from the succ document.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_string.rb?r1=14598&r2=14597

Index: test/ruby/test_string.rb
===================================================================
--- test/ruby/test_string.rb	(revision 14597)
+++ test/ruby/test_string.rb	(revision 14598)
@@ -1055,6 +1055,13 @@
     assert_equal(S("2000aaa"),  S("1999zzz").succ)
     assert_equal(S("AAAAA000"), S("ZZZZ999").succ)
     assert_equal(S("*+"), S("**").succ)
+
+    assert_equal("abce", "abcd".succ)
+    assert_equal("THX1139", "THX1138".succ)
+    assert_equal("<<koalb>>", "<<koala>>".succ)
+    assert_equal("2000aaa", "1999zzz".succ)
+    assert_equal("AAAA0000", "ZZZ9999".succ)
+    assert_equal("**+", "***".succ)
   end
 
   def test_succ!

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

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