]> git.refcnt.org Git - colorize.git/commitdiff
Check exit value for displaying version data
authorSteven Schubiger <stsc@refcnt.org>
Wed, 11 Jun 2014 12:55:04 +0000 (14:55 +0200)
committerSteven Schubiger <stsc@refcnt.org>
Wed, 11 Jun 2014 12:55:04 +0000 (14:55 +0200)
test.pl

diff --git a/test.pl b/test.pl
index 8d8b592895def338f13a8723414f8aaa5d9e2b8f..27f7a67e928dada7e6d8048acae0c195fd611533 100755 (executable)
--- a/test.pl
+++ b/test.pl
@@ -10,7 +10,7 @@ use IPC::Open3 qw(open3);
 use Symbol qw(gensym);
 use Test::More;
 
-my $tests = 23;
+my $tests = 24;
 
 my %BUF_SIZE = (
    normal => 1024,
@@ -42,7 +42,8 @@ SKIP: {
     my $program = tmpnam();
     skip 'compiling failed (normal)', $tests unless system("gcc -DTEST -DBUF_SIZE=$BUF_SIZE{normal} -o $program $source") == 0;
 
-    is(system("$program --help >/dev/null 2>&1"), 0, 'exit value for help screen');
+    is(system("$program --help >/dev/null 2>&1"),    0, 'exit value for help screen');
+    is(system("$program --version >/dev/null 2>&1"), 0, 'exit value for version data');
 
     my $run_program_fail = sub
     {