summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGerrit P. Haase <gp@familiehaase.de>2001-10-16 17:01:04 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2001-10-16 13:04:38 +0000
commit73077d539ecc1b3cdb02af89ac34a6328eef1a86 (patch)
treef9c3b1bb7ab9866f2f25107d59b9e69072dc777c /t
parent79af22e4562a90bdaa3aa9d22a11a3fa41f9c6bc (diff)
downloadperl-73077d539ecc1b3cdb02af89ac34a6328eef1a86.tar.gz
[ PATCH ] maint/perl/t/io/fs.t for build on Cygwin
Message-ID: <3BCC4BB0.30935.2145B7@localhost> p4raw-id: //depot/perl@12453
Diffstat (limited to 't')
-rwxr-xr-xt/io/fs.t26
1 files changed, 17 insertions, 9 deletions
diff --git a/t/io/fs.t b/t/io/fs.t
index bd07833cbd..8a700b2cae 100755
--- a/t/io/fs.t
+++ b/t/io/fs.t
@@ -245,14 +245,21 @@ else {
}
# check if rename() can be used to just change case of filename
-chdir './tmp';
-open(fh,'>x') || die "Can't create x";
-close(fh);
-rename('x', 'X');
-print 'not ' unless -e 'X';
-print "ok 27\n";
-unlink 'X';
-chdir $wd || die "Can't cd back to $wd";
+if ($^O eq 'cygwin') {
+ print "ok 27 # skipped: works only if check_case is set to relaxed.\n";
+} else {
+ chdir './tmp';
+ open(fh,'>x') || die "Can't create x";
+ close(fh);
+ rename('x', 'X');
+
+ # this works on win32 only, because fs isn't casesensitive
+ print 'not ' unless -e 'X';
+
+ print "ok 27\n";
+ unlink 'X';
+ chdir $wd || die "Can't cd back to $wd";
+}
# check if rename() works on directories
if ($Is_VMSish) {
@@ -267,4 +274,5 @@ print "ok 28\n";
-d 'tmp1' or print "not ";
print "ok 29\n";
-END { rmdir 'tmp1'; 1 while unlink "Iofs.tmp"; }
+# need to remove 'tmp' if rename() in test 28 failed!
+END { rmdir 'tmp1'; rmdir 'tmp'; unlink "Iofs.tmp"; }