Subject: | t/04_merge_move_copy_delete_lexicon_utf-8.t fails with Test::Differences 0.67 |
After upgrading Test-Differences from 0.66 to 0.67 t/04_merge_move_copy_delete_lexicon_utf-8.t fails like this:
# Failed test 'deleted entry'
# at t/04_merge_move_copy_delete_lexicon_utf-8.t line 274.
# +----+-------------------------------------------------------------+----+--------------------------+
# | Elt|Got | Elt|Expected |
# +----+-------------------------------------------------------------+----+--------------------------+
# | 0|{ | 0|{ |
# | 1| '' => { | 1| '' => { |
# | 2| nplurals => 2, | 2| nplurals => 2, |
# | 3| plural => 'n != 1', | 3| plural => 'n != 1', |
# | 4| plural_code => sub { | 4| plural_code => sub { |
# * 5| package Locale::TextDomain::OO::Singleton::Lexicon; * | |
# | 6| use warnings; | 5| use warnings; |
# | 7| use strict; | 6| use strict; |
# * 8| return shift() != 1;\n * 7|\s\s\s\s\s\s\s\s\n *
# | 9| } | 8| } |
# | 10| } | 9| } |
# | 11|} | 10|} |
# +----+-------------------------------------------------------------+----+--------------------------+
# Looks like you failed 6 tests of 12.
Test-Differences-0.67 changelog mentions "Correctly compare subroutine references" only.
I can see the test performs:
eq_or_diff
$deleted,
{
q{} => {
nplurals => 2,
plural => 'n != 1',
plural_code => sub {},
},
},
'deleted entry';
I have no idea how Test::Differences came up with the expected plural_code content, but it's true that suppressing code reference stringification with $Test::Differences::NoDeparse=1 (as documented in Test::Differences) helps.