summaryrefslogtreecommitdiff
path: root/ext/Cwd
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-01-04 20:45:31 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-01-04 20:45:31 +0000
commit889f7a4f8452140cca0c6ad9df71017733139f90 (patch)
treedfd28278bc18d317ec655b746acd6704cf9181fa /ext/Cwd
parentc5ee2135734475fb187b41accfd390dc0b6d8a97 (diff)
downloadperl-889f7a4f8452140cca0c6ad9df71017733139f90.tar.gz
Upgrade to Cwd 2.13
p4raw-id: //depot/perl@22056
Diffstat (limited to 'ext/Cwd')
-rw-r--r--ext/Cwd/Changes8
-rw-r--r--ext/Cwd/t/cwd.t31
2 files changed, 18 insertions, 21 deletions
diff --git a/ext/Cwd/Changes b/ext/Cwd/Changes
index b6d8ce54c8..c117944921 100644
--- a/ext/Cwd/Changes
+++ b/ext/Cwd/Changes
@@ -1,5 +1,13 @@
Revision history for Perl extension Cwd.
+2.13 Fri Jan 2 22:29:42 CST 2004
+
+ - Changed a '//' comment to a '/* */' comment in the XS code, so that
+ it'll compile properly under ANSI C rules. [Jarkko Hietaniemi]
+
+ - Fixed a 1-character buffer overrun problem in the C code. [The BSD
+ people]
+
2.12 Fri Dec 19 17:04:52 CST 2003
- Fixed a bug on Cygwin - the output of realpath() should have been
diff --git a/ext/Cwd/t/cwd.t b/ext/Cwd/t/cwd.t
index 92ec184ff0..394b4b56e4 100644
--- a/ext/Cwd/t/cwd.t
+++ b/ext/Cwd/t/cwd.t
@@ -90,20 +90,11 @@ SKIP: {
}
my $Top_Test_Dir = '_ptrslt_';
-my $Test_Dir = "$Top_Test_Dir/_path_/_to_/_a_/_dir_";
-my $want = "t/$Test_Dir";
-if( $IsVMS ) {
- # translate the unixy path to VMSish
- $want =~ s|/|\.|g;
- $want .= '\]';
- $want = '((?i)' . $want . ')'; # might be ODS-2 or ODS-5
-} elsif ( $IsMacOS ) {
- $_ = ":$_" for ($Top_Test_Dir, $Test_Dir);
- s|/|:|g, s|$|:| for ($want, $Test_Dir);
-}
+my $Test_Dir = File::Spec->catdir($Top_Test_Dir, qw/_path_ _to_ _a_ _dir_/);
+my $want = File::Spec->catdir('t', $Test_Dir);
-mkpath(["$Test_Dir"], 0, 0777);
-Cwd::chdir "$Test_Dir";
+mkpath([$Test_Dir], 0, 0777);
+Cwd::chdir $Test_Dir;
like(cwd(), qr|$want$|, 'chdir() + cwd()');
like(getcwd(), qr|$want$|, ' + getcwd()');
@@ -126,14 +117,12 @@ print "#$ENV{PWD}\n";
rmtree([$Top_Test_Dir], 0, 0);
-if ($IsVMS) {
- like($ENV{PWD}, qr|\b((?i)t)\]$|);
-}
-elsif ($IsMacOS) {
- like($ENV{PWD}, qr|\bt:$|);
-}
-else {
- like($ENV{PWD}, qr|\bt$|);
+{
+ my $check = ($IsVMS ? qr|\b((?i)t)\]$| :
+ $IsMacOS ? qr|\bt:$| :
+ qr|\bt$| );
+
+ like($ENV{PWD}, $check);
}
SKIP: {