summaryrefslogtreecommitdiff
path: root/test/test_unicode_normalize.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_unicode_normalize.rb')
-rw-r--r--test/test_unicode_normalize.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_unicode_normalize.rb b/test/test_unicode_normalize.rb
index 64916a0855..75b571a4a3 100644
--- a/test/test_unicode_normalize.rb
+++ b/test/test_unicode_normalize.rb
@@ -3,15 +3,17 @@
# Copyright Ayumu Nojima (野島 歩) and Martin J. Dürst (duerst@it.aoyama.ac.jp)
require 'test/unit'
+require 'unicode_normalize/normalize'
class TestUnicodeNormalize < Test::Unit::TestCase
- UNICODE_VERSION = '7.0.0'
+ UNICODE_VERSION = UnicodeNormalize::UNICODE_VERSION
NormTest = Struct.new :source, :NFC, :NFD, :NFKC, :NFKD, :line
def read_tests
IO.readlines(File.expand_path("../enc/unicode/data/#{UNICODE_VERSION}/NormalizationTest.txt", __dir__), encoding: 'utf-8')
+ .tap { |lines| assert_include(lines[0], "NormalizationTest-#{UNICODE_VERSION}.txt")}
.collect.with_index { |linedata, linenumber| [linedata, linenumber]}
.reject { |line| line[0] =~ /^[\#@]/ }
.collect do |line|