add file version check for new Unicode emoji file header

The change in the Unicode emoji file header took place at
version 14.0.0, but is needed only from version 15.0.0
because in version 14.0.0, another check is still active.
This commit is contained in:
Martin Dürst 2022-12-06 09:38:06 +09:00
parent f82a38be26
commit ea532bd557

View File

@ -84,7 +84,8 @@ class TestEmojiBreaks < Test::Unit::TestCase
raise "File Name Mismatch: line: #{line}, expected filename: #{file.basename}.txt" raise "File Name Mismatch: line: #{line}, expected filename: #{file.basename}.txt"
end end
end end
version_mismatch = false if line =~ /^# Version: #{file.version}/ version_mismatch = false if line =~ /^# Version: #{file.version}/ # 13.0 and older
version_mismatch = false if line =~ /^# Used with Emoji Version #{EMOJI_VERSION}/ # 14.0 and newer
next if line.match?(/\A(#|\z)/) next if line.match?(/\A(#|\z)/)
if line =~ /^(\h{4,6})\.\.(\h{4,6}) *(;.+)/ # deal with Unicode ranges in emoji-sequences.txt (Bug #18028) if line =~ /^(\h{4,6})\.\.(\h{4,6}) *(;.+)/ # deal with Unicode ranges in emoji-sequences.txt (Bug #18028)
range_start = $1.to_i(16) range_start = $1.to_i(16)