Subject: | Junctions don't play well with Test::Builder |
The following test script illustrates the problem (version 1.10):
use Test::More tests => 4;
use Perl6::Junction 'any';
my $ab = any(qw<a b>);
ok 'a' eq $ab, 'direct compare match';
is 'a', $ab, 'test passed';
TODO: {
local $TODO = 'just playing around';
ok 'c' eq $ab, 'direct compare match';
is 'c', $ab, 'test passed';
}
This results in the following output:
1..4
ok 1 - direct compare match
ok 2 - test passed
not ok 3 - direct compare match # TODO just playing around
# Failed (TODO) test 'direct compare match'
# in test.pl at line 10.
not ok 4 - test passed # TODO just playing around
# Failed (TODO) test 'test passed'
# in test.pl at line 11.
Operation `""': no method found, argument in overloaded package
Perl6::Junction::Any at /usr/local/lib/perl5/5.8.7/Test/Builder.pm line 580.
# Looks like your test died just after 4.
Cheers,
Ovid