mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
3943dcd180
commit
fb1059312d
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue