1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/ruby/enc
Koichi Sasada fc6e4ce62b Allow .0 version mismatch to pass the tests
With `make update-unicode`, some tests failed with the following error
due to header mismatch.

* `RbConfig::CONFIG['UNICODE_EMOJI_VERSION']` => 14.0
* the header line is `# emoji-variation-sequences-14.0.0.txt`

So the last `.0` is mismatch.
This patch allows additional `.0` in the header line.

Please revert this patch when a correct patach is merged.

```
  1) Error:
TestEmojiBreaks#test_embedded_emoji:
RuntimeError: File Name Mismatch: line: # emoji-variation-sequences-14.0.0.txt, expected filename: emoji-variation-sequences.txt
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:88:in `block (2 levels) in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `foreach'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `block in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `each'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:111:in `all_tests'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:127:in `test_embedded_emoji'
  2) Error:
TestEmojiBreaks#test_mixed_emoji:
RuntimeError: File Name Mismatch: line: # emoji-variation-sequences-14.0.0.txt, expected filename: emoji-variation-sequences.txt
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:88:in `block (2 levels) in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `foreach'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `block in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `each'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:111:in `all_tests'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:139:in `test_mixed_emoji'
  3) Error:
TestEmojiBreaks#test_single_emoji:
RuntimeError: File Name Mismatch: line: # emoji-variation-sequences-14.0.0.txt, expected filename: emoji-variation-sequences.txt
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:88:in `block (2 levels) in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `foreach'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:82:in `block in read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `each'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:79:in `read_data'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:111:in `all_tests'
    /tmp/ruby/v3/src/trunk/test/ruby/enc/test_emoji_breaks.rb:117:in `test_single_emoji'
```
2022-03-16 11:30:37 +09:00
..
test_big5.rb
test_case_comprehensive.rb
test_case_mapping.rb
test_case_options.rb
test_cesu8.rb
test_cp949.rb
test_emoji.rb
test_emoji_breaks.rb Allow .0 version mismatch to pass the tests 2022-03-16 11:30:37 +09:00
test_euc_jp.rb
test_euc_kr.rb
test_euc_tw.rb
test_gb18030.rb
test_gbk.rb
test_grapheme_breaks.rb
test_iso_8859.rb
test_koi8.rb
test_regex_casefold.rb
test_shift_jis.rb
test_utf16.rb
test_utf32.rb
test_windows_1251.rb
test_windows_1252.rb