summaryrefslogtreecommitdiffstats
path: root/t/check_stuff.t
diff options
context:
space:
mode:
Diffstat (limited to 't/check_stuff.t')
-rwxr-xr-xt/check_stuff.t24
1 files changed, 7 insertions, 17 deletions
diff --git a/t/check_stuff.t b/t/check_stuff.t
index 2d2ce38..64f95ae 100755
--- a/t/check_stuff.t
+++ b/t/check_stuff.t
@@ -2,7 +2,7 @@
2# 2#
3use strict; use warnings; 3use strict; use warnings;
4#use Test::More qw(no_plan); 4#use Test::More qw(no_plan);
5use Test::More tests => 16; 5use Test::More tests => 14;
6 6
7my ($r,$args); 7my ($r,$args);
8my $s = 't/check_stuff.pl'; 8my $s = 't/check_stuff.pl';
@@ -22,23 +22,13 @@ $r = `$s`;
22is $?>>8 , $e{UNKNOWN}, "exits($e{UNKNOWN}) with no args"; 22is $?>>8 , $e{UNKNOWN}, "exits($e{UNKNOWN}) with no args";
23like $r, qr/^$n UNKNOWN/, "UNKNOWN with no args"; 23like $r, qr/^$n UNKNOWN/, "UNKNOWN with no args";
24 24
25$r = `$s -V`;
26is $?>>8 , $e{UNKNOWN}, "exits($e{UNKNOWN}) with -V arg";
27like $r, qr/^[\w\.]+ \d+/i, "looks like there's a version";
25 28
26#TODO: 29$r = `$s -h`;
27SKIP: { 30is $?>>8 , $e{UNKNOWN}, "exits($e{UNKNOWN}) with -h arg";
28 local $TODO = q~d'oh! we'll have to redirect STDERR and check it with like() here instead of checking `` which only gets STDIN. Maybe use IPC::Open3?~; 31like $r, qr/usage/i, "looks like there's something helpful"; # broken
29 skip "too noisy, see TODO here", 6;
30
31 $r = `$s -V`;
32 is $?>>8 , $e{UNKNOWN}, "exits($e{UNKNOWN}) with -V arg";
33 like $r, qr/\d+\.\d/i, "looks like there's a version"; # broken
34 is $r, '', "prints nothing to STDOUT";
35
36 $r = `$s -h`;
37 is $?>>8 , $e{UNKNOWN}, "exits($e{UNKNOWN}) with -h arg";
38 like $r, qr/usage/i, "looks like there's something helpful"; # broken
39 is $r, '', "prints nothing to STDOUT";
40}
41
42 32
43$args = " -r 99 "; 33$args = " -r 99 ";
44diag "running `$s $args`" if $ENV{TEST_VERBOSE}; 34diag "running `$s $args`" if $ENV{TEST_VERBOSE};