Lines Matching refs:tmpfile2
19 my $tmpfile2 = tempfile();
21 my $ok = symlink($tmpfile1, $tmpfile2);
26 ok(-l $tmpfile2, "-l sees it as a symlink");
27 ok(unlink($tmpfile2), "and remove it");
31 ok(symlink($tmpfile1, $tmpfile2), "and symlink to it");
32 ok(-l $tmpfile2, "which does look like a symlink");
34 ok(-d $tmpfile2, "normal -d sees it as a directory");
35 is(readlink($tmpfile2), $tmpfile1, "readlink works");
36 check_stat($tmpfile1, $tmpfile2, "check directory and link stat are the same");
37 ok(unlink($tmpfile2), "and we can unlink the symlink (rather than only rmdir)");
59 ok(symlink($path, $tmpfile2), "symlink $path");
60 my $attr = GetFileAttributes($tmpfile2);
63 unlink($tmpfile2);
75 ok(symlink($tmpfile1, $tmpfile2), "link to it");
76 ok(-l $tmpfile2, "-l sees a link");
78 ok(-f $tmpfile2, "normal -f sees it as a file");
79 is(readlink($tmpfile2), $tmpfile1, "readlink works");
80 check_stat($tmpfile1, $tmpfile2, "check file and link stat are the same");
81 ok(unlink($tmpfile2), "unlink the symlink");
85 ok(symlink("./$tmpfile1", $tmpfile2), "UNIX (/) relative link to the file");
86 ok(-f $tmpfile2, "we can see it through the link");
87 ok(unlink($tmpfile2), "unlink the symlink");
97 if (system("mklink /j $tmpfile2 $tmpfile1") == 0) {
98 ok(-l $tmpfile2, "junction does look like a symlink");
99 like(readlink($tmpfile2), qr/\Q$tmpfile1\E$/,
101 ok(unlink($tmpfile2), "unlink magic for junctions");