From adc2840abb764dc7eece3d798ac1f20af2a5c1cd Mon Sep 17 00:00:00 2001 From: David Yingling Date: Mon, 25 Nov 2013 22:47:14 -0500 Subject: [PATCH] Added SKIP block to skip new's tests if there is no terminal according to -t. This fixes some CPAN Testers FAILs due to STDIN not being a proper terminal, which borks all of the Term::ReadLine->new('fetchware test') calls. --- t/bin-fetchware-new.t | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/bin-fetchware-new.t b/t/bin-fetchware-new.t index 74e027c..436ef02 100644 --- a/t/bin-fetchware-new.t +++ b/t/bin-fetchware-new.t @@ -37,6 +37,12 @@ BEGIN { } +SKIP: { + # Must be 1 less than the number of tests in the Test::More use line above. + my $how_many = 16; + skip 'Not on a terminal', $how_many unless -t; + + subtest 'test opening_message() success' => sub { print_ok(sub {opening_message()}, <