From: Michael G. Schwern Date: Sat, 3 Nov 2001 15:41:47 +0000 (-0500) Subject: Re: [PATCH lib/Term/Cap.t] Skip testing where Term::Cap won't run (was Re: Win95... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6222ea982923143b82f6cc746e96854484c8537b;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH lib/Term/Cap.t] Skip testing where Term::Cap won't run (was Re: Win95 under stress) Message-ID: <20011103154147.C600@blackrider> p4raw-id: //depot/perl@12838 --- diff --git a/lib/Term/Cap.t b/lib/Term/Cap.t index 8502006..fb87bd2 100644 --- a/lib/Term/Cap.t +++ b/lib/Term/Cap.t @@ -12,16 +12,19 @@ END { 1 while unlink('tcout'); } -use Test::More tests => 43; +use Test::More; # 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; +my $files = join '', + grep { -f $_ } + ( $ENV{HOME} . '/.termcap', # we assume pretty UNIXy system anyway + '/etc/termcap', + '/usr/share/misc/termcap' ); +unless( $files ) { + plan skip_all => 'no termcap available to test'; +} +else { + plan tests => 43; } use_ok( 'Term::Cap' );