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

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

Thread Previous | Thread Next
From:
Jim Cromie
Date:
April 27, 2006 06:32
Subject:
Re: [PATCH] t/op/pat.t using test.pl
Message ID:
4450C7C8.5030208@gmail.com
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..

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


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About