avoid cpan indexing of test::helper
[perl-fuse.git] / test / symlink.t
1 #!/usr/bin/perl
2 use test::helper qw($_point $_real);
3 use Test::More;
4 plan tests => 6;
5 chdir($_point);
6 ok(symlink("abc","def"),"symlink created");
7 ok(-l "def","symlink exists");
8 is(readlink("def"),"abc","it worked");
9 chdir($_real);
10 ok(-l "def","symlink really exists");
11 is(readlink("def"),"abc","really worked");
12 unlink("def");
13
14 # bug: doing a 'cp -a' on a directory which contains a symlink
15 # reports an error
16 mkdir("dira");
17 open($file, '>', 'dira/filea');
18 close($file);
19 symlink('filea', 'dira/fileb');
20 my $cp = 'cp -a';
21 if ($^O eq 'netbsd') { $cp = 'cp -R'; }
22 is(system($cp . " dira dirb")>>8,0,$cp);
23 map { unlink($_) } ('dira/filea', 'dira/fileb', 'dirb/filea', 'dirb/fileb');
24 map { rmdir($_) } ('dira', 'dirb');