Subject: | Failed test on perl 5.20.2 |
A simple test. This may be a bug in the interaction between Unknown::Values and new $Data::Dumper::Useperl semantics.
$ ~/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/bin/perl -Ilib -MData::Dumper -E 'package Data::Dumper; use Unknown::Values; $Useperl = 1; say Dumper([unknown])'
Dereferencing cannot be performed on unknown values at lib/Unknown/Values/Instance.pm line 55.
Unknown::Values::Instance::dereference(Unknown::Values::Instance=HASH(0xf177d8), undef, "") called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/5.20.2/x86_64-linux-thread-multi/Data/Dumper.pm line 443
Data::Dumper::_dump(Data::Dumper=HASH(0xf0de10), Unknown::Values::Instance=HASH(0xf177d8), "\$VAR1->[0]") called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/5.20.2/x86_64-linux-thread-multi/Data/Dumper.pm line 410
Data::Dumper::_dump(Data::Dumper=HASH(0xf0de10), ARRAY(0xeeee78), "\$VAR1") called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/5.20.2/x86_64-linux-thread-multi/Data/Dumper.pm line 252
Data::Dumper::Dumpperl called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/5.20.2/x86_64-linux-thread-multi/Data/Dumper.pm line 227
Data::Dumper::Dump("Data::Dumper", ARRAY(0xf0dcd8)) called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/5.20.2/x86_64-linux-thread-multi/Data/Dumper.pm line 595
Data::Dumper::Dumper(ARRAY(0xeeee78)) called at -e line 1
Which is fine. Except that this is also done inside Test::Differences, which is called by Unknown::Values' test suite, and I get the following output:
$ ~/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/bin/perl -Ilib t/basic.t
ok 1 - Direct comparisons to unknown should fail (==)
ok 2 - ... and unknown should not be == to itself
ok 3 - ... and unknown should not be eq to itself
ok 4 - Direct comparisons to unknown should fail (<=)
ok 5 - Direct comparisons to unknown should fail (>=)
ok 6 - Direct comparisons to unknown should fail (>)
ok 7 - Direct comparisons to unknown should fail (<)
ok 8 - Direct negative comparisons to unknown should fail (!=)
ok 9 - Direct negative comparisons to unknown should fail (ne)
ok 10 - Negative comparisons of unknown to unknown should fail (ne)
ok 11 - unknown values are not returned with <
ok 12 - unknown values are not returned with >
Dereferencing cannot be performed on unknown values at lib/Unknown/Values/Instance.pm line 55.
Unknown::Values::Instance::dereference(Unknown::Values::Instance=HASH(0x15428e8), undef, "") called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/5.20.2/x86_64-linux-thread-multi/Data/Dumper.pm line 438
Data::Dumper::_dump(Data::Dumper=HASH(0x1b97160), Unknown::Values::Instance=HASH(0x15428e8), "\$VAR1->[0]") called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/5.20.2/x86_64-linux-thread-multi/Data/Dumper.pm line 410
Data::Dumper::_dump(Data::Dumper=HASH(0x1b97160), ARRAY(0x15473f8), "\$VAR1") called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/5.20.2/x86_64-linux-thread-multi/Data/Dumper.pm line 252
Data::Dumper::Dumpperl called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/5.20.2/x86_64-linux-thread-multi/Data/Dumper.pm line 227
Data::Dumper::Dump("Data::Dumper", ARRAY(0x1547830)) called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/5.20.2/x86_64-linux-thread-multi/Data/Dumper.pm line 595
Data::Dumper::Dumper(ARRAY(0x15473f8)) called at /home/dmcbride/tmp/isas/perl5.20.2/opt/IBM/mibe/perl/lib/site_perl/5.20.2/Test/Differences.pm line 421
Test::Differences::eq_or_diff(ARRAY(0x15473f8), ARRAY(0x1b871f8), "... but you can look for unknown values") called at t/basic.t line 26
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 12.