use vars qw( $Term::Complete::complete $complete );
my $restore;
-
SKIP: {
skip('PERL_SKIP_TTY_TEST', 8) if $ENV{PERL_SKIP_TTY_TEST};
skip("$TTY not a tty", 8) if defined $TTY && ! -t TTY;
$restore = `stty -g`;
skip("Can't reliably restore $TTY", 8) if $?;
- }
+ }
use_ok( 'Term::Complete' );
# now remove the prompt and we should be okay
$$out =~ s/prompt://g;
is( $$out, get_expected('frobn', 'frobnitz' ), 'works with new $complete' );
-`stty $restore`;
+
+`stty $restore` if defined $restore;
} # end of SKIP, end of tests