X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02.stdout.t;h=f76a392e49b97ffbfbf24c443a3053183e68c31e;hb=d02fc7049ca4136768336ba4bfe42e361924f674;hp=5ce4e99eb647e85eff12efc890b8da88b1338462;hpb=7a4ac6b206281dbfd5356b8917e155724488d4d7;p=gitmo%2FMooseX-Daemonize.git diff --git a/t/02.stdout.t b/t/02.stdout.t index 5ce4e99..f76a392 100644 --- a/t/02.stdout.t +++ b/t/02.stdout.t @@ -30,6 +30,8 @@ my $Test = Test::Builder->new; package main; use Cwd; +use strict; +use warnings; ## Try to make sure we are in the test directory chdir 't' if ( Cwd::cwd() !~ m|/t$| ); @@ -40,7 +42,14 @@ my $app = TestOutput->new( ); daemonize_ok( $app, 'child forked okay' ); sleep(3); # give ourself a chance to produce some output -$app->stop( no_exit => 1 ); + +my $warnings = ""; +{ + local $SIG{__WARN__} = sub { $warnings .= $_[0]; warn @_ }; + $app->stop( no_exit => 1 ); +} + +is($warnings, "", "No warnings from stop"); check_test_output($app); unlink( $app->test_output );