Explorar el Código

Added test for check_file_age.pl option --ignore-missing - thanks waja.

abrist hace 12 años
padre
commit
d6e72e9071
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      plugins-scripts/t/check_file_age.t

+ 6 - 1
plugins-scripts/t/check_file_age.t

@@ -5,7 +5,7 @@
 #
 
 use strict;
-use Test::More tests => 15;
+use Test::More tests => 16;
 use NPTest;
 
 my $successOutput = '/^FILE_AGE OK: /';
@@ -57,6 +57,11 @@ $result = NPTest->testCmd(
 	);
 cmp_ok( $result->return_code, '==', 0, "Checking file size" );
 
+$result = NPTest->testCmd(
+	"./check_file_age -f /non/existent --ignore-missing"
+	);
+cmp_ok( $result->return_code, '==', 0, "Honors --ignore-missing" );
+
 $result = NPTest->testCmd(
 	"./check_file_age -f $temp_file -c 1000 -W 101"
 	);