summaryrefslogtreecommitdiff
path: root/test/ruby/enc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-28 06:56:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-28 06:56:50 +0000
commit023aaa51a20cb4e0dc92daa4d2197741bcf8bd6c (patch)
treea80b72df76cf2c1aceec06564c3d219168cdeb40 /test/ruby/enc
parent5026a663ab3e01600131b9bd84c672548a1cd3d8 (diff)
Skip unavailable tests
* test/ruby/enc/test_case_comprehensive.rb: noting to test if Unicode data files are available. [ruby-core:76160] [Bug #12433] * test/test_unicode_normalize.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/enc')
-rw-r--r--test/ruby/enc/test_case_comprehensive.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/test/ruby/enc/test_case_comprehensive.rb b/test/ruby/enc/test_case_comprehensive.rb
index 6d561d6d33..bb80b6f8ce 100644
--- a/test/ruby/enc/test_case_comprehensive.rb
+++ b/test/ruby/enc/test_case_comprehensive.rb
@@ -25,7 +25,12 @@ class TestComprehensiveCaseFold < Test::Unit::TestCase
def self.expand_filename(basename)
File.expand_path("#{UNICODE_DATA_PATH}/#{basename}.txt", __dir__)
end
+end
+%w[UnicodeData CaseFolding SpecialCasing].all? {|f|
+ File.exist?(TestComprehensiveCaseFold.expand_filename(f))
+} and
+class TestComprehensiveCaseFold
def self.read_data_file (filename)
IO.foreach(expand_filename(filename), encoding: Encoding::ASCII_8BIT) do |line|
if $. == 1
@@ -238,15 +243,6 @@ class TestComprehensiveCaseFold < Test::Unit::TestCase
end
end
- def check_file_available(filename)
- expanded = self.class.expand_filename(filename)
- assert File.exist?(expanded), "File #{expanded} missing."
- end
-
- def test_AAAAA_data_files_available # AAAAA makes sure this test is run first
- %w[UnicodeData CaseFolding SpecialCasing].each { |f| check_file_available f }
- end
-
generate_ascii_only_case_mapping_tests 'ISO-8859-2'
generate_ascii_only_case_mapping_tests 'ISO-8859-3'
generate_ascii_only_case_mapping_tests 'ISO-8859-4'