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

ruby-changes:36307

From: nobu <ko1@a...>
Date: Wed, 12 Nov 2014 08:54:54 +0900 (JST)
Subject: [ruby-changes:36307] nobu:r48388 (trunk): test_unicode_normalize.rb: skip only once

nobu	2014-11-12 08:54:45 +0900 (Wed, 12 Nov 2014)

  New Revision: 48388

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

  Log:
    test_unicode_normalize.rb: skip only once
    
    * test/test_unicode_normalize.rb (setup): skip only once, and
      silently ignore other tests.

  Modified files:
    trunk/test/test_unicode_normalize.rb
Index: test/test_unicode_normalize.rb
===================================================================
--- test/test_unicode_normalize.rb	(revision 48387)
+++ test/test_unicode_normalize.rb	(revision 48388)
@@ -21,8 +21,6 @@ class TestUnicodeNormalize < Test::Unit: https://github.com/ruby/ruby/blob/trunk/test/test_unicode_normalize.rb#L21
         code_string.split(/\s/).collect { |cp| cp.to_i(16) }.pack('U*')
       end + [line[1]+1])
     end
-  rescue Errno::ENOENT => e
-    skip e.message
   end
 
   def to_codepoints(string)
@@ -31,6 +29,9 @@ class TestUnicodeNormalize < Test::Unit: https://github.com/ruby/ruby/blob/trunk/test/test_unicode_normalize.rb#L29
 
   def setup
     @@tests ||= read_tests
+  rescue Errno::ENOENT => e
+    @@tests ||= []
+    skip e.message
   end
 
   def self.generate_test_normalize(target, normalization, source, prechecked)

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

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