X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=installcheck%2Famreport.pl;h=3b4886189d6d7801c259f28fc63041a82fa3a671;hb=377e15b597bafb8e7c2a100f11a0166f7220fe1c;hp=345a024dfcd83703b53539da684ed5aacb1adbb3;hpb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;p=debian%2Famanda diff --git a/installcheck/amreport.pl b/installcheck/amreport.pl index 345a024..3b48861 100644 --- a/installcheck/amreport.pl +++ b/installcheck/amreport.pl @@ -16,10 +16,11 @@ # 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 +208,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 +522,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'),