brianmario / charlock_holmes

Character encoding detection, brought to you by ICU
MIT License
1.03k stars 140 forks source link

Make tests less brittle with newer ICU versions #129

Closed brianmario closed 6 years ago

brianmario commented 6 years ago

This changes the list comparison tests for encoding detection to instead check that the expected encodings are within the list, not the exact list. In newer versions of ICU, some UTF-16 encodings were included in the results and breaking these tests. This makes sure we're compatible with that going forward.

This still isn't perfect, as encoding guesses can change in the future. But it should be less brittle than we are today.

This also includes a compatibility change readying us for Minitest 6.