develooper Front page | perl.perl5.porters | Postings from April 2006

Re: [PATCH] t/op/pat.t using

Thread Previous | Thread Next
Jim Cromie
April 27, 2006 06:32
Re: [PATCH] t/op/pat.t using
Message ID:
David Landgren wrote:
> In a further iteration I'd like to break out all the
>   ok(/(expr)/ && $1 eq 'foo', 'my test')
> tests into
>   ok(/(expr)/, 'my test match');
>   cmp_ok($1, 'eq', 'foo', 'my test result');
does it matter that $1 is only set on a match (IIRC), and that an old value
could accidentally match the expected  ?  ('foo' being as common as it is)
I imagine the tests avoided that potential..

    is there a string equivalent to NaN, that doent match any string, 
inc (another copy of) itself ?
> Thanks,
> David

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About