print "ok 21 # skipped: no link\nok 22 # skipped: no link\n";
}
else {
- print "ok 21 # skipped: $^O is neither 'MSWin32' nor 'NetWare'\nok 22 # skipped: $^O is neither 'MSWin32' nor 'NetWare'\n";
+ print "ok 21 # skipped: '$^O' is neither 'MSWin32' nor 'NetWare'\nok 22 # skipped: $^O is neither 'MSWin32' nor 'NetWare'\n";
}
}
}
# 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) {
+ # must have delete access to rename a directory
+ `set file tmp.dir/protection=o:d`;
rename 'tmp.dir', 'tmp1.dir' or print "not ";
}
else {
-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"; }