8 die $@ if $@ and !is_miniperl();
13 my $tmpfile1 = tempfile();
14 my $tmpfile2 = tempfile();
17 ok(!link($tmpfile1, $tmpfile2),
18 "Cannot link to unknown file");
19 is(0+$!, &Errno::ENOENT, "check errno is ENOENT");
20 open my $fh, ">", $tmpfile1
21 or skip("Cannot create test link src", 2);
23 open my $fh, ">", $tmpfile2
24 or skip("Cannot create test link target", 2);
26 ok(!link($tmpfile1, $tmpfile2),
27 "Cannot link to existing file");
28 is(0+$!, &Errno::EEXIST, "check for EEXIST");