Subject: | Missing Tie::File skips |
Recently tried to install IO::All and discovered several tests failing. On closer inspection, there were 3 tests that internally were depending upon Tie::File, which isn't installed.
Attached patch covers the 3 tests, incorporated into test scripts construct.t and input.t
--- C:\wip\diffs\IO-All\IO-All-0.33/t/construct.t Tue Nov 30 07:30:42 2004
+++ C:\wip\diffs\IO-All\IO-All-0.33-barbie/t/construct.t Tue Mar 29 13:40:31 2005
@@ -27,7 +27,13 @@
my $io6 = io->rdonly->new->file('t/construct.t');
ok($io6->_rdonly);
-test_file_contents(join('', map {"$_\n"} @$io6), 't/construct.t');
+
+SKIP: {
+ eval {require Tie::File};
+ skip "requires Tie::File", 1 if $@;
+
+ test_file_contents(join('', map {"$_\n"} @$io6), 't/construct.t');
+}
my $io7 = io->socket('foo.com:80')->get_socket_domain_port;
ok($io7->is_socket);
--- C:\wip\diffs\IO-All\IO-All-0.33/t/input.t Tue Nov 30 07:30:42 2004
+++ C:\wip\diffs\IO-All\IO-All-0.33-barbie/t/input.t Tue Mar 29 13:40:31 2005
@@ -24,14 +24,19 @@
$contents = join '', $io->getlines;
test_file_contents($contents, 't/input.t');
-$io->rdonly;
-$contents = join '', map "$_\n", @$io;
-test_file_contents($contents, 't/input.t');
-$io->close;
+SKIP: {
+ eval {require Tie::File};
+ skip "requires Tie::File", 2 if $@;
-$io->tie;
-$contents = join '', <$io>;
-test_file_contents($contents, 't/input.t');
+ $io->rdonly;
+ $contents = join '', map "$_\n", @$io;
+ test_file_contents($contents, 't/input.t');
+ $io->close;
+
+ $io->tie;
+ $contents = join '', <$io>;
+ test_file_contents($contents, 't/input.t');
+}
my @lines = io('t/input.t')->slurp;
ok(@lines > 36);