X-Git-Url: http://git.maemo.org/git/?p=dh-make-perl;a=blobdiff_plain;f=dev%2Farm%2Flibio-stringy-perl%2Fio-stringy-2.110%2Ft%2Fsimple.t;fp=dev%2Farm%2Flibio-stringy-perl%2Fio-stringy-2.110%2Ft%2Fsimple.t;h=5f7d2fecb8230dec330a5d2f8df5bb54ed8857c0;hp=0000000000000000000000000000000000000000;hb=f477fa73365d491991707e7ed9217b48d6994551;hpb=da95c414033799c3a62606f299c3c00b5c77ca11 diff --git a/dev/arm/libio-stringy-perl/io-stringy-2.110/t/simple.t b/dev/arm/libio-stringy-perl/io-stringy-2.110/t/simple.t new file mode 100644 index 0000000..5f7d2fe --- /dev/null +++ b/dev/arm/libio-stringy-perl/io-stringy-2.110/t/simple.t @@ -0,0 +1,63 @@ +#!/usr/bin/perl -w #-*-Perl-*- + +use lib "./t", "./lib"; +use IO::Scalar; +use IO::ScalarArray; +use IO::Lines; +use ExtUtils::TBone; +use Common; + + +#-------------------- +# +# TEST... +# +#-------------------- + +### Make a tester: +my $T = typical ExtUtils::TBone; +Common->test_init(TBone=>$T); +$T->log_warnings; + +### Set the counter: +my $ntests = 6; +$T->begin($ntests); + +#------------------------------ + +my $SH = new IO::Scalar; +print $SH "Hi there!\n"; +print $SH "Tres cool, no?\n"; +$T->ok_eq(${$SH->sref}, "Hi there!\nTres cool, no?\n"); + +$SH->seek(0, 0); +my $line = <$SH>; +$T->ok_eq($line, "Hi there!\n"); + +#------------------------------ + +my $AH = new IO::ScalarArray; +print $AH "Hi there!\n"; +print $AH "Tres cool, no?\n"; +$T->ok_eq(join('', @{$AH->aref}), "Hi there!\nTres cool, no?\n"); + +$AH->seek(0, 0); +$line = <$AH>; +$T->ok_eq($line, "Hi there!\n"); + +#------------------------------ + +my $LH = new IO::Lines; +print $LH "Hi there!\n"; +print $LH "Tres cool, no?\n"; +$T->ok_eq(join('', @{$LH->aref}), "Hi there!\nTres cool, no?\n"); + +$LH->seek(0, 0); +$line = <$LH>; +$T->ok_eq($line, "Hi there!\n"); + + + +### So we know everything went well... +$T->end; +