Acme-EyeDrops
view release on metacpan or search on metacpan
t/05_Parrot.t view on Meta::CPAN
test_one('Fixed width helloworld', "hello world\n", $ss x 8);
# --------------------------------------------------
$prog = sightly({ Shape => 'larry',
SourceFile => $hellofile,
InformHandler => sub {},
Regex => 1 } );
test_one("Larry helloworld", "hello world\n", $larrystr);
# ----------------------------------------------------
$prog = sightly({ Shape => 'larry,damian',
SourceFile => $hellofile,
InformHandler => sub {},
Regex => 1 } );
test_one('Larry/Damian helloworld', "hello world\n", $larrystr . $damianstr);
# ----------------------------------------------------
$prog = sightly({ Shape => 'damian,larry',
SourceFile => $hellofile,
Gap => 2,
InformHandler => sub {},
Regex => 1 } );
test_one('Damian/Larry helloworld', "hello world\n",
join("\n\n", $damianstr, $larrystr));
# ----------------------------------------------------
my $shape = "#################### \n \n########## \n" x 11;
$prog = sightly({ ShapeString => $shape,
SourceFile => $hellofile,
InformHandler => sub {},
Regex => 1 } );
test_one('Trailing spaces in shape', "hello world\n", $shape);
# ----------------------------------------------------
$prog = sightly({ Shape => 'siertri,larry,siertri,larry',
SourceFile => $hellofile,
Gap => 2,
InformHandler => sub {},
Regex => 1 } );
test_one('siertr/Larry x 2 helloworld', "hello world\n",
join("\n\n", make_siertri(0), $larrystr,
make_siertri(0), $larrystr));
# ----------------------------------------------------
$prog = sightly({ Shape => "larry,triangle,$tmpf2",
SourceFile => $hellofile,
Gap => 2,
InformHandler => sub {},
Regex => 1 } );
test_one('larry/triangle/camelshapefile helloworld', "hello world\n",
join("\n\n", $larrystr, make_triangle(0), $camelstr));
# ----------------------------------------------------
unlink($tmpf) or die "error: unlink '$tmpf': $!";
unlink($tmpf2) or die "error: unlink '$tmpf2': $!";
unlink($tmpeye) or die "error: unlink '$tmpeye': $!";
unlink($tmpeye2) or die "error: unlink '$tmpeye2': $!";
unlink($hellofile) or die "error: unlink '$hellofile': $!";
( run in 1.273 second using v1.01-cache-2.11-cpan-39bf76dae61 )