Close temporary test file before unlinking (for the sake of Win32)
Steve Hay [Thu, 26 Oct 2006 16:26:56 +0000 (16:26 +0000)]
p4raw-id: //depot/perl@29120

lib/Term/UI/t/02_ui.t

index 18a60a4..dbefdce 100644 (file)
@@ -20,7 +20,7 @@ if( $ENV{PERL_CORE} ) {
     close *STDOUT;
     open *STDOUT, ">termui.$$" or diag("Could not open tempfile");
 }
-END { unlink "termui.$$" if $ENV{PERL_CORE} }
+END { close *STDOUT && unlink "termui.$$" if $ENV{PERL_CORE} }
 
 
 ### so T::RL doesn't go nuts over no console