зеркало из https://github.com/github/ruby.git
* test/test_unicode_normalize.rb: added unicode version number to
test data location. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
53117e9fd2
Коммит
f288185d46
|
@ -1,3 +1,8 @@
|
|||
Fri Oct 31 09:58:14 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||
|
||||
* test/test_unicode_normalize.rb: added unicode version number to
|
||||
test data location.
|
||||
|
||||
Fri Oct 31 09:56:41 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||
|
||||
* .gitignore: ignored unicode data with version directories.
|
||||
|
|
|
@ -6,9 +6,11 @@ require 'test/unit'
|
|||
|
||||
NormTest = Struct.new :source, :NFC, :NFD, :NFKC, :NFKD, :line
|
||||
|
||||
UNICODE_VERSION = '7.0.0'
|
||||
|
||||
class TestNormalize < Test::Unit::TestCase
|
||||
def read_tests
|
||||
IO.readlines(File.expand_path('../enc/unicode/data/NormalizationTest.txt', __dir__), encoding: 'utf-8')
|
||||
IO.readlines(File.expand_path("../enc/unicode/data/#{UNICODE_VERSION}/NormalizationTest.txt", __dir__), encoding: 'utf-8')
|
||||
.collect.with_index { |linedata, linenumber| [linedata, linenumber]}
|
||||
.reject { |line| line[0] =~ /^[\#@]/ }
|
||||
.collect do |line|
|
||||
|
|
Загрузка…
Ссылка в новой задаче