1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

always run unicode normalization that do not depend on data file

* test/test_unicode_normalize.rb: extract tests that do not depend
  on NormalizationTest.txt data file from conditionally constructed
  part of TestUnicodeNormalize class, to always run them even if
  the data file isn't found.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
duerst 2018-07-28 09:11:13 +00:00
parent fb1059312d
commit 9eb6304aa9

View file

@ -146,7 +146,9 @@ class TestUnicodeNormalize
generate_test_check_false :NFC, :NFKC, :nfkc
generate_test_check_false :NFD, :NFKC, :nfkc
generate_test_check_false :NFKD, :NFKC, :nfkc
end
class TestUnicodeNormalize
def test_non_UTF_8
assert_equal "\u1E0A".encode('UTF-16BE'), "D\u0307".encode('UTF-16BE').unicode_normalize(:nfc)
assert_equal true, "\u1E0A".encode('UTF-16BE').unicode_normalized?(:nfc)