Skip to content

Commit

Permalink
Skip POE::Wheel::ReadLine testing if the module can't be loaded due to
Browse files Browse the repository at this point in the history
an inferior termcap.  Resolves issues discovered by Chris Williams in
http://www.nntp.perl.org/group/perl.cpan.testers/347151
  • Loading branch information
rcaputo committed Sep 8, 2006
1 parent 9c3fb60 commit ec30468
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions tests/30_loops/00_base/wheel_readline.pm
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
# $Id: /branches/poe-tests/tests/30_loops/00_base/wheel_tail.pm 10644 2006-05-29T17:02:47.597324Z bsmith $
# $Id$

# Exercises Wheel::ReadLine

Expand Down Expand Up @@ -140,8 +140,6 @@ BEGIN {
}
}

plan tests => scalar(@tests);

use Symbol qw(gensym);
use POSIX qw(
sysconf setsid _SC_OPEN_MAX ECHO ICANON IEXTEN ISIG BRKINT ICRNL
Expand Down Expand Up @@ -210,7 +208,17 @@ END {
}
}

use POE qw(Filter::Stream Wheel::ReadLine Wheel::ReadWrite);
use POE qw(Filter::Stream Wheel::ReadWrite);

eval "use POE::Wheel::ReadLine";
if ($@ and $@ =~ /requires a termcap/) {
my $error = $@;
$error =~ s/ at \S+ line \d+.*//;
$error =~ s/\s+/ /g;
plan skip_all => $error;
}

plan tests => scalar(@tests);

### Session to run the tests.

Expand Down

0 comments on commit ec30468

Please sign in to comment.