diff options
Diffstat (limited to 'ext/PerlIO/t/via.t')
-rw-r--r-- | ext/PerlIO/t/via.t | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/PerlIO/t/via.t b/ext/PerlIO/t/via.t index 85f5b8e6be..d40e85e365 100644 --- a/ext/PerlIO/t/via.t +++ b/ext/PerlIO/t/via.t @@ -20,14 +20,14 @@ my $fh; my $a = join("", map { chr } 0..255) x 10; my $b; -BEGIN { use_ok('PerlIO::Via::QuotedPrint'); } +BEGIN { use_ok('PerlIO::via::QuotedPrint'); } -ok( !open($fh,"<Via(PerlIO::Via::QuotedPrint)", $tmp), 'open QuotedPrint for input fails'); -ok( open($fh,">Via(PerlIO::Via::QuotedPrint)", $tmp), 'open QuotedPrint for output'); +ok( !open($fh,"<via(PerlIO::via::QuotedPrint)", $tmp), 'open QuotedPrint for input fails'); +ok( open($fh,">via(PerlIO::via::QuotedPrint)", $tmp), 'open QuotedPrint for output'); ok( (print $fh $a), "print to output file"); ok( close($fh), 'close output file'); -ok( open($fh,"<Via(PerlIO::Via::QuotedPrint)", $tmp), 'open QuotedPrint for input'); +ok( open($fh,"<via(PerlIO::via::QuotedPrint)", $tmp), 'open QuotedPrint for input'); { local $/; $b = <$fh> } ok( close($fh), "close input file"); @@ -45,7 +45,7 @@ is($a, $b, 'compare original data with filtered version'); print $fh "Hello\n"; close($fh); - ok( ! open($fh,">Via(Unknown::Module)", $tmp), 'open Via Unknown::Module will fail'); + ok( ! open($fh,">via(Unknown::Module)", $tmp), 'open via Unknown::Module will fail'); like( $warnings, qr/^Cannot find package 'Unknown::Module'/, 'warn about unknown package' ); # Now open normally again to see if we get right fileno @@ -62,17 +62,17 @@ is($a, $b, 'compare original data with filtered version'); $warnings = ''; no warnings 'layer'; - ok( ! open($fh,">Via(Unknown::Module)", $tmp), 'open Via Unknown::Module will fail'); + ok( ! open($fh,">via(Unknown::Module)", $tmp), 'open via Unknown::Module will fail'); is( $warnings, "", "don't warn about unknown package" ); } my $obj = ''; sub Foo::PUSHED { $obj = shift; -1; } -sub PerlIO::Via::Bar::PUSHED { $obj = shift; -1; } -open $fh, '<:Via(Foo)', "foo"; +sub PerlIO::via::Bar::PUSHED { $obj = shift; -1; } +open $fh, '<:via(Foo)', "foo"; is( $obj, 'Foo', 'search for package Foo' ); -open $fh, '<:Via(Bar)', "bar"; -is( $obj, 'PerlIO::Via::Bar', 'search for package PerlIO::Via::Bar' ); +open $fh, '<:via(Bar)', "bar"; +is( $obj, 'PerlIO::via::Bar', 'search for package PerlIO::via::Bar' ); END { 1 while unlink $tmp; |