Imported Upstream version 3.3.2
[debian/amanda] / installcheck / amreport.pl
index 00faff397e18471cc152b7f71a531559765aceb0..d8532d5398bb4580f69f0a6c0b055a4f4b3dc36e 100644 (file)
@@ -1,4 +1,4 @@
-# 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
 # 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@";
 
@@ -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'),