From: Axel Beckert Date: Thu, 18 Apr 2013 13:31:47 +0000 (+0200) Subject: Properly clean up after t/xt-create-xen-config.t X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=081c0370d44f5cecde99baa68656dbcd880f66b8;p=people%2Fdariof%2Fxen-tools.git Properly clean up after t/xt-create-xen-config.t --- diff --git a/t/xt-create-xen-config.t b/t/xt-create-xen-config.t index a4cd26e..662e4de 100755 --- a/t/xt-create-xen-config.t +++ b/t/xt-create-xen-config.t @@ -140,7 +140,7 @@ sub runCreateCommand # # Create a temporary directory, and make sure it is present. # - my $dir = File::Temp::tempdir( CLEANUP => 0 ); + my $dir = File::Temp::tempdir( CLEANUP => 1 ); ok ( -d $dir, "The temporary directory was created: $dir" ); # @@ -176,7 +176,7 @@ sub runCreateCommand my @LINES = ; close( OUTPUT ); - return( join( "\n", @LINES ) ); + return( join( "\n", @LINES ), $dir ); } @@ -193,7 +193,7 @@ sub testOutputContains my ( $text, %params ) = ( @_ ); # Get the output of running the command. - my $output = runCreateCommand( %params ); + my ($output, $dir) = runCreateCommand( %params ); # # Look to see if we got the text. @@ -220,7 +220,7 @@ sub noMentionOf my ( $text, %params ) = ( @_ ); # Get the output of running the command. - my $output = runCreateCommand( %params ); + my ($output, $dir) = runCreateCommand( %params ); # # Look to see if we got the text.