Patrick R. Michaud wrote: > On Mon, Aug 25, 2008 at 12:15:05AM +0200, Moritz Lenz wrote: >> Larry Wall wrote: >> > I think it would be best if all boolean contexts collapse consistently, >> > and I would consider all of those to be boolean contexts. More >> > precisely, && and || are boolean on the left, but not on the right. >> >> Very good. >> As a follow-up for the testers: should ok() expect an Object as its >> first argument? If so we could say >> >> ok 1|2, 'Junction 1|2 is true in boolean context'; > > Keeping with my general philosophy that I'd like to keep > the requirements needed to run Test.pm (and the test suite) > as simple as possible, I'd prefer to not require type checking > within Test.pm in order for it to work right. > > Beyond that, if we're testing a Junction in boolean > context, I think I would prefer to make that an explicit > part of the test itself: > > ok ?(1|2), 'Junction 1|2 is true in boolean context';
I re-wrote the tests to use that kind of syntax, and add it to the official tests: http://svn.pugscode.org/pugs/t/spec/S03-junctions/boolean-context.t My next step will be to fudge it for rakudo. Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/