develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33924 - trunk/t/perl

From:
chromatic
Date:
December 15, 2008 11:09
Subject:
[svn:parrot] r33924 - trunk/t/perl
Message ID:
20081215190944.93BA5CBA12@x12.develooper.com
Author: chromatic
Date: Mon Dec 15 11:09:43 2008
New Revision: 33924

Modified:
   trunk/t/perl/Parrot_Test.t

Log:
[t] Fixed an uninitialized value warning in test for Parrot::Test.

Modified: trunk/t/perl/Parrot_Test.t
==============================================================================
--- trunk/t/perl/Parrot_Test.t	(original)
+++ trunk/t/perl/Parrot_Test.t	Mon Dec 15 11:09:43 2008
@@ -548,13 +548,15 @@
     "Array ref holding multiple commands unchanged as expected");
 
 {
-    my $oldvalgrind = $ENV{VALGRIND};
-    $command_orig = 'ls';
-    my $foo = 'foobar';
+    my $oldvalgrind      = defined $ENV{VALGRIND} ? $ENV{VALGRIND} : '';
+    $command_orig        = 'ls';
+    my $foo              = 'foobar';
     local $ENV{VALGRIND} = $foo;
-    my $ret = Parrot::Test::_handle_command($command_orig);
+    my $ret              = Parrot::Test::_handle_command($command_orig);
+
     is( $ret->[0], "$foo $command_orig",
         "Got expected value in Valgrind environment");
+
     $ENV{VALGRIND} = $oldvalgrind;
 }
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About