diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-21 15:47:26 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-21 15:47:26 +0000 |
commit | 4ba7095c8b1e78642662b76b43ac3fa8cbda5537 (patch) | |
tree | 64079ec2b7f69684200a6694d7556804680117ef /t/io/fs.t | |
parent | dafca956013a09f7b5201b464199f47cf100f00f (diff) | |
download | perl-4ba7095c8b1e78642662b76b43ac3fa8cbda5537.tar.gz |
Robustness support for #8218 (symlink forest) since the GNU
tools seem to be overly picky about symlinkage depths.
p4raw-id: //depot/perl@8220
Diffstat (limited to 't/io/fs.t')
-rwxr-xr-x | t/io/fs.t | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -129,10 +129,15 @@ chdir $wd || die "Can't cd back to $wd"; unlink 'c'; if ($^O ne 'MSWin32' and `ls -l perl 2>/dev/null` =~ /^l.*->/) { # we have symbolic links - if (symlink("TEST","c")) {print "ok 21\n";} else {print "not ok 21\n";} - $foo = `grep perl c`; + system("cp TEST TEST$$"); + # we have to copy because e.g. GNU grep gets huffy if we have + # a symlink forest to another disk (it complains about too many + # levels of symbolic links, even if we have only two) + if (symlink("TEST$$","c")) {print "ok 21\n";} else {print "not ok 21\n";} + $foo = `grep perl c 2>&1`; if ($foo) {print "ok 22\n";} else {print "not ok 22\n";} unlink 'c'; + unlink("TEST$$"); } else { print "ok 21\nok 22\n"; |