develooper Front page | perl.perl5.porters | Postings from June 2004

[PATCH Cwd 2.18] test not adapted to perl core

Thread Next
From:
Rafael Garcia-Suarez
Date:
June 24, 2004 10:11
Subject:
[PATCH Cwd 2.18] test not adapted to perl core
Message ID:
20040624190800.25377822@localhost
I fsck'd up the integration of 2.17_03 in bleadperl, so I missed this.
The cwd.t test fail when run from the perl core harness, because it's
not in the right directory.
Here's a fix :

--- Cwd-2.18/t/cwd.t    2004-06-24 15:32:46.000000000 +0200
+++ bleadperl/ext/Cwd/t/cwd.t   2004-06-24 19:02:15.000000000 +0200
@@ -1,9 +1,12 @@
 #!./perl
 
-use Cwd;
 BEGIN {
     chdir 't' if -d 't';
+    if ($ENV{PERL_CORE}) {
+       unshift @INC, '../lib';
+    }
 }
+use Cwd;
 
 use Config;
 use strict;
@@ -142,6 +145,8 @@
     unlink "linktest";
 }
 
+chdir '../ext/Cwd/t' if $ENV{PERL_CORE};
+
 # Make sure we can run abs_path() on files, not just directories
 my $path = 'cwd.t';
 dir_ends_with(Cwd::abs_path($path), 'cwd.t', 'abs_path() can be invoked on a file');

Thread Next


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