summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-28 08:56:59 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-28 08:56:59 +0000
commitfb1059312d2a40e6437853ad2e40049d55308860 (patch)
treef5520cac005d98cdfb0d53916323fff1e392dc90
parent3943dcd1806491197ab702cec69dd249afb69f1f (diff)
update unicode data files directory for normalization tests
* test/test_unicode_normalize.rb: search ucd directory first if it exists. This change follows r61415. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/test_unicode_normalize.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_unicode_normalize.rb b/test/test_unicode_normalize.rb
index 347741d..35ce337 100644
--- a/test/test_unicode_normalize.rb
+++ b/test/test_unicode_normalize.rb
@@ -9,10 +9,11 @@ require 'unicode_normalize/normalize'
class TestUnicodeNormalize < Test::Unit::TestCase
UNICODE_VERSION = RbConfig::CONFIG['UNICODE_VERSION']
- UNICODE_DATA_PATH = "../enc/unicode/data/#{UNICODE_VERSION}"
+ path = File.expand_path("../enc/unicode/data/#{UNICODE_VERSION}", __dir__)
+ UNICODE_DATA_PATH = File.directory?("#{path}/ucd") ? "#{path}/ucd" : path
def self.expand_filename(basename)
- File.expand_path("#{UNICODE_DATA_PATH}/#{basename}.txt", __dir__)
+ File.expand_path("#{basename}.txt", UNICODE_DATA_PATH)
end
end