зеркало из https://github.com/github/ruby.git
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:
Родитель
3943dcd180
Коммит
fb1059312d
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче