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

ruby-changes:3729

From: ko1@a...
Date: Thu, 24 Jan 2008 20:47:57 +0900 (JST)
Subject: [ruby-changes:3729] usa - Ruby:r15218 (trunk): * test/ruby/test_m17n.rb: follow to the following changes.

usa	2008-01-24 20:47:37 +0900 (Thu, 24 Jan 2008)

  New Revision: 15218

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_m17n.rb

  Log:
    * test/ruby/test_m17n.rb: follow to the following changes.
    


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15218&r2=15217&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_m17n.rb?r1=15218&r2=15217&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15217)
+++ ChangeLog	(revision 15218)
@@ -1,3 +1,7 @@
+Thu Jan 24 20:46:17 2008  NAKAMURA Usaku  <usa@r...>
+
+	* test/ruby/test_m17n.rb: follow to the following changes.
+
 Thu Jan 24 20:21:07 2008  NAKAMURA Usaku  <usa@r...>
 
 	* parser.y (parser_str_new): automatically update string literal's
Index: test/ruby/test_m17n.rb
===================================================================
--- test/ruby/test_m17n.rb	(revision 15217)
+++ test/ruby/test_m17n.rb	(revision 15218)
@@ -54,7 +54,7 @@
   end
 
   def assert_regexp_generic_ascii(r)
-    assert_encoding("ASCII-8BIT", r.encoding)
+    assert_encoding("US-ASCII", r.encoding)
     assert_regexp_generic_encoding(r)
   end
 
@@ -137,17 +137,17 @@
   # tests start
 
   def test_string_ascii_literal
-    assert_encoding("ASCII-8BIT", eval(a(%{""})).encoding)
-    assert_encoding("ASCII-8BIT", eval(a(%{"a"})).encoding)
+    assert_encoding("US-ASCII", eval(a(%{""})).encoding)
+    assert_encoding("US-ASCII", eval(a(%{"a"})).encoding)
   end
 
   def test_string_eucjp_literal
-    assert_encoding("ASCII-8BIT", eval(e(%{""})).encoding)
-    assert_encoding("ASCII-8BIT", eval(e(%{"a"})).encoding)
+    assert_encoding("US-ASCII", eval(e(%{""})).encoding)
+    assert_encoding("US-ASCII", eval(e(%{"a"})).encoding)
     assert_encoding("EUC-JP", eval(e(%{"\xa1\xa1"})).encoding)
     assert_encoding("EUC-JP", eval(e(%{"\\xa1\\xa1"})).encoding)
-    assert_encoding("ASCII-8BIT", eval(e(%{"\\x20"})).encoding)
-    assert_encoding("ASCII-8BIT", eval(e(%{"\\n"})).encoding)
+    assert_encoding("US-ASCII", eval(e(%{"\\x20"})).encoding)
+    assert_encoding("US-ASCII", eval(e(%{"\\n"})).encoding)
     assert_encoding("EUC-JP", eval(e(%{"\\x80"})).encoding)
   end
 
@@ -363,8 +363,6 @@
     assert_regexp_fixed_ascii8bit(eval(a(%{/\xc2\xa1/n})))
     assert_regexp_fixed_ascii8bit(eval(a(%q{/\xc2\xa1/})))
 
-    assert_raise(SyntaxError) { eval("/\xa1\xa1/n".force_encoding("euc-jp")) }
-
     [/\xc2\xa1/n, eval(a(%{/\xc2\xa1/})), eval(a(%{/\xc2\xa1/n}))].each {|r|
       assert_equal(nil, r =~ a("a"))
       assert_equal(nil, r =~ e("a"))
@@ -681,7 +679,7 @@
     #assert_strenc("\"\xC2\xA1\"", 'Windows-31J', s("%p") % s("\xc2\xa1"))
     assert_strenc("\"\xC2\xA1\"", 'UTF-8', u("%p") % u("\xc2\xa1"))
 
-    assert_strenc('"\xC2\xA1"', 'ASCII-8BIT', "%10p" % a("\xc2\xa1"))
+    assert_strenc('"\xC2\xA1"', 'US-ASCII', "%10p" % a("\xc2\xa1"))
     assert_strenc("       \"\xC2\xA1\"", 'EUC-JP', "%10p" % e("\xc2\xa1"))
     #assert_strenc("       \"\xC2\xA1\"", 'Windows-31J', "%10p" % s("\xc2\xa1"))
     assert_strenc("       \"\xC2\xA1\"", 'UTF-8', "%10p" % u("\xc2\xa1"))

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

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