spec/unicode_name_spec.rb in unicode-name-1.13.1 vs spec/unicode_name_spec.rb in unicode-name-1.13.2
- old
+ new
@@ -7,19 +7,27 @@
assert_equal "LATIN CAPITAL LETTER A", Unicode::Name.of("A")
assert_equal "AERIAL TRAMWAY", Unicode::Name.of("π‘")
assert_equal "REPLACEMENT CHARACTER", Unicode::Name.of("οΏ½")
end
- it "works for CJK Ideographs" do
+ it "works for CJK unified ideographs" do
assert_equal "CJK UNIFIED IDEOGRAPH-4E01", Unicode::Name.of("δΈ")
end
- it "works for Hangul Syllables" do
+ it "works for Hangul syllables" do
assert_equal "HANGUL SYLLABLE HAN", Unicode::Name.of("ν")
assert_equal "HANGUL SYLLABLE GAG", Unicode::Name.of("κ°")
assert_equal "HANGUL SYLLABLE GAE", Unicode::Name.of("κ°")
assert_equal "HANGUL SYLLABLE GAENG", Unicode::Name.of("κ°±")
assert_equal "HANGUL SYLLABLE DWALB", Unicode::Name.of("λ«")
+ end
+
+ it "works with some ranges that have the codepoint embedded" do
+ assert_equal "EGYPTIAN HIEROGLYPH-143F5", Unicode::Name.of("π΅")
+ assert_equal "KHITAN SMALL SCRIPT CHARACTER-18C12", Unicode::Name.of("π°")
+ assert_equal "TANGUT IDEOGRAPH-18D00", Unicode::Name.of("π΄")
+ assert_equal "NUSHU CHARACTER-1B171", Unicode::Name.of("π
±")
+ assert_equal "CJK COMPATIBILITY IDEOGRAPH-2F9B1", Unicode::Name.of("𧃒")
end
it "will return nil for characters without name" do
assert_nil Unicode::Name.of("\u{10c50}")
assert_nil Unicode::Name.of("\0")