lintian doesn't like orphan packages with uploaders...
[debian/amanda] / installcheck / amreport.pl
index 345a024dfcd83703b53539da684ed5aacb1adbb3..0d27adf6e11eb9d193f4790e91263b6ce2b4eb38 100644 (file)
@@ -1,8 +1,9 @@
-# Copyright (c) 2009, 2010 Zmanda, Inc.  All Rights Reserved.
+# Copyright (c) 2009-2012 Zmanda, Inc.  All Rights Reserved.
 #
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
 
-use Test::More tests => 166;
+use Test::More tests => 167;
 
 use strict;
 use warnings;
+use Errno;
 use Cwd qw(abs_path);
 use lib "@amperldir@";
 
@@ -207,7 +209,7 @@ like(run_err($amreport, 'TESTCONF-NOSUCH'),
 ok(!run($amreport, 'TESTCONF-NOSUCH', '--help'),
     "amreport --help exits with status 1");
 like($Installcheck::Run::stdout,
-    qr/Usage: amreport conf/,
+    qr/Usage: amreport \[--version\]/,
     "..and prints usage message");
 
 like(run_get($amreport, 'TESTCONF-NOSUCH', '--version'),
@@ -521,6 +523,11 @@ ok(run($amreport, 'TESTCONF', '--from-amdump'),
   or diag($Installcheck::Run::stderr);
 ok(!-f $mail_output, "..produces no mail output");
 is($Installcheck::Run::stdout, "", "..produces no stdout output");
+$! = &Errno::ENOENT;
+my $enoent = $!;
+like($Installcheck::Run::stderr,
+     qr/^error: the mailer '.*' is not an executable program\.$/,
+     "..produces correct stderr output");
 results_match(
     $printer_output,
     $cat->get_text('postscript'),