summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/cpan/Term-Cap/test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Term-Cap/test.pl')
-rwxr-xr-xgnu/usr.bin/perl/cpan/Term-Cap/test.pl17
1 files changed, 9 insertions, 8 deletions
diff --git a/gnu/usr.bin/perl/cpan/Term-Cap/test.pl b/gnu/usr.bin/perl/cpan/Term-Cap/test.pl
index 76ec96dabd6..59782fe2851 100755
--- a/gnu/usr.bin/perl/cpan/Term-Cap/test.pl
+++ b/gnu/usr.bin/perl/cpan/Term-Cap/test.pl
@@ -20,11 +20,12 @@ my $files = join '',
( $ENV{HOME} . '/.termcap', # we assume pretty UNIXy system anyway
'/etc/termcap',
'/usr/share/misc/termcap' );
-unless( $files || $^O eq 'VMS' ) {
+my $terminfo = `infocmp -C 2>/dev/null`;
+unless( $files || $terminfo || $^O eq 'VMS' ) {
plan skip_all => 'no termcap available to test';
}
else {
- plan tests => 45;
+ plan tests => 44;
}
use_ok( 'Term::Cap' );
@@ -120,7 +121,7 @@ SKIP: {
$ENV{TERMPATH} = '!';
$ENV{TERMCAP} = '';
eval { $t = Term::Cap->Tgetent($vals) };
- isn't( $@, '', 'Tgetent() should catch bad termcap file' );
+ isnt( $@, '', 'Tgetent() should catch bad termcap file' );
}
SKIP: {
@@ -134,10 +135,10 @@ SKIP: {
# it shouldn't try to read one file more than 32(!) times
# see __END__ for a really awful termcap example
- $ENV{TERMPATH} = join(' ', ('tcout') x 33);
- $vals->{TERM} = 'bar';
- eval { $t = Term::Cap->Tgetent($vals) };
- like( $@, qr/failed termcap loop/, 'Tgetent() should catch deep recursion');
+# $ENV{TERMPATH} = join(' ', ('tcout') x 33);
+# $vals->{TERM} = 'bar';
+# eval { $t = Term::Cap->Tgetent($vals) };
+# like( $@, qr/failed termcap loop/, 'Tgetent() should catch deep recursion');
# now let it read a fake termcap file, and see if it sets properties
$ENV{TERMPATH} = 'tcout';
@@ -163,7 +164,7 @@ SKIP:
local *^O;
local *ENV;
delete $ENV{TERM};
- $^O = 'Win32';
+ $^O = 'MSWin32';
my $foo = Term::Cap->Tgetent();
is($foo->{TERM} ,'dumb','Windows gets "dumb" by default');