Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Log-Dispatch CPAN distribution.

Report information
The Basics
Id: 11948
Status: resolved
Priority: 0/
Queue: Log-Dispatch

People
Owner: Nobody in particular
Requestors: ron [...] savage.net.au
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.10
Fixed in: 2.11



Subject: Cleaning up test file 01-basic.t
I get these 3 'Can't remove' msgs: F:\perl-modules\Log-Dispatch-2.10>perl Build test t\01-basic....ok 1/131# Can't remove ./max_test.log: Permission denied # Can't temove ./handle_test.log: Permission denied t\01-basic....ok 98/131# Can't remove ./would_test.log: Permission denied t\01-basic....ok 4/131 skipped: various reasons t\99-pod......ok 1/1 skipped: File::Find::Rule not installed All tests successful, 5 subtests skipped. Files=2, Tests=132, 4 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) After the patch below I don't get them: F:\perl-modules\Log-Dispatch-2.10>perl Build test t\01-basic....ok 4/131 skipped: various reasons t\99-pod......ok 1/1 skipped: File::Find::Rule not installed All tests successful, 5 subtests skipped. Files=2, Tests=132, 5 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) Patch: F:\perl-modules\Log-Dispatch-2.10\t>diff -r -u 01-basic.t.original 01-basic.t --- 01-basic.t.original 2005-03-21 10:38:06.000000000 +1100 +++ 01-basic.t 2005-03-21 10:36:40.000000000 +1100 @@ -92,6 +92,7 @@ # 7 max_level test { + { my $dispatch = Log::Dispatch->new; $dispatch->add( Log::Dispatch::File->new( name => 'file1', min_level => 'debug', @@ -100,6 +101,7 @@ $dispatch->log( level => 'emerg', message => "emergency\n" ); $dispatch->log( level => 'crit', message => "critical\n" ); + } open LOG, './max_test.log' or die "Can't read ./max_test.log: $!"; @@ -138,8 +140,10 @@ is( $log[0], "handle test\n", "Log::Dispatch::Handle created log file should contain 'handle test\\n'" ); + close LOG; + unlink './handle_test.log' - or diag( "Can't temove ./handle_test.log: $!" ); + or diag( "Can't remove ./handle_test.log: $!" ); } # 9 Log::Dispatch::Email::MailSend @@ -511,6 +515,7 @@ # 129 - 131 - would_log { + { my $dispatch = Log::Dispatch->new; $dispatch->add( Log::Dispatch::File->new( name => 'file1', @@ -525,6 +530,7 @@ ok( $dispatch->would_log('crit'), "will log 'crit'" ); + } unlink './would_test.log' or diag( "Can't remove ./would_test.log: $!" );