* test/ruby/enc/test_case_comprehensive.rb: Add explicit skip test for

availability of Unicode data files.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
duerst 2016-07-26 04:05:03 +00:00
Родитель 706534b5f5
Коммит c2b500a000
2 изменённых файлов: 18 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Tue Jul 26 13:04:59 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
* test/ruby/enc/test_case_comprehensive.rb: Add explicit skip test for
availability of Unicode data files.
Mon Jul 25 21:33:13 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* range.c (check_step_domain): check step argument domain by <=>

Просмотреть файл

@ -14,12 +14,21 @@ class TestComprehensiveCaseFold < Test::Unit::TestCase
def self.expand_filename(basename)
File.expand_path("#{UNICODE_DATA_PATH}/#{basename}.txt", __dir__)
end
def self.data_files_available?
%w[UnicodeData CaseFolding SpecialCasing].all? do |f|
File.exist?(expand_filename(f))
end
end
def test_data_files_available
unless TestComprehensiveCaseFold.data_files_available?
skip "Unicode data files not available in #{UNICODE_DATA_PATH}."
end
end
end
%w[UnicodeData CaseFolding SpecialCasing].all? {|f|
File.exist?(TestComprehensiveCaseFold.expand_filename(f))
} and
class TestComprehensiveCaseFold
TestComprehensiveCaseFold.data_files_available? and class TestComprehensiveCaseFold
(CaseTest = Struct.new(:method_name, :attributes, :first_data, :follow_data)).class_eval do
def initialize(method_name, attributes, first_data, follow_data=first_data)
super