From: chromatic Date: Sat, 3 Nov 2001 12:28:17 +0000 (-0700) Subject: Skip testing where Term::Cap won't run (was Re: Win95 under stress) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cdfc6b8a4d928dfedc6e0d72c47eee1664e95fdc;p=p5sagit%2Fp5-mst-13.2.git Skip testing where Term::Cap won't run (was Re: Win95 under stress) Message-ID: <20011103193507.94848.qmail@onion.perl.org> p4raw-id: //depot/perl@12836 --- diff --git a/lib/Term/Cap.t b/lib/Term/Cap.t index 438a144..8502006 100644 --- a/lib/Term/Cap.t +++ b/lib/Term/Cap.t @@ -14,6 +14,16 @@ END { use Test::More tests => 43; +# these names are hardcoded in Term::Cap +my $files = join '', grep { -f $_ } ( $ENV{HOME} . '/.termcap', '/etc/termcap', + '/usr/share/misc/termcap' ); +unless ($files) { + SKIP: { + skip('no termcap available to test', 43); + } + exit; +} + use_ok( 'Term::Cap' ); local (*TCOUT, *OUT); @@ -27,11 +37,9 @@ if (open(TCOUT, ">tcout")) { $writable = 0; } -# termcap_path -- the names are hardcoded in Term::Cap +# termcap_path $ENV{TERMCAP} = ''; my $path = join '', Term::Cap::termcap_path(); -my $files = join '', grep { -f $_ } ( $ENV{HOME} . '/.termcap', '/etc/termcap', - '/usr/share/misc/termcap' ); is( $path, $files, 'termcap_path() should find default files' ); SKIP: {