develooper Front page | perl.qa | Postings from December 2002

Re: Binary-wise is()

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
December 10, 2002 01:02
Subject:
Re: Binary-wise is()
Message ID:
20021210095645.532fb427.rgarciasuarez@free.fr
Mark Fowler <mark@twoshortplanks.com> wrote:
> > > I'd like to have a custom version of is(), say binary_is(), that
> > > reports 'strings 1 and 2 differ at byte 635, got 0x92, expected 0x42'
> > > or 'strings 1 differ in length, got 3874, expected 3875'.
> 
> Oooh, that would be really helpful.  I often find myself writing tests
> which just currently do a
> 
>   ok($slurp eq $test_data, "files match");
> 
> as is() doesn't produce very helpful output
> 
> > See http://www.pobox.com/~schwern/talks/Writing_A_Test_Library/full_slides/
> > for details about using Test::Builder.
> 
> <plug>See also Acme::Test::Buffy (lame example testing module), and
> Test::Builder::Tester for help testing Test::Binary.</plug>

Thanks. See http://search.cpan.org/author/RGARCIA/Test-LongString-0.01/ for
a first version.

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