obstruct pod2man doc tweaks
[p5sagit/p5-mst-13.2.git] / t / lib / filecopy.t
CommitLineData
1a3850a5 1#!./perl
2
3BEGIN {
4 chdir 't' if -d 't';
5 @INC = '../lib';
6}
7
441496b2 8print "1..5\n";
1a3850a5 9
10$| = 1;
11
12use File::Copy;
13
14# First we create a file
15open(F, ">file-$$") or die;
16print F "ok 3\n";
17close F;
18
19copy "file-$$", "copy-$$";
20
21open(F, "copy-$$") or die;
22$foo = <F>;
23close(F);
24
25print "not " if -s "file-$$" != -s "copy-$$";
26print "ok 1\n";
27
28print "not " unless $foo eq "ok 3\n";
29print "ok 2\n";
30
31copy "copy-$$", \*STDOUT;
32
33unlink "file-$$";
441496b2 34
35print "not " if move("file-$$", "copy-$$") or not -e "copy-$$";
36print "ok 4\n";
37
38move "copy-$$", "file-$$";
39
40print "not " unless -e "file-$$" and not -e "copy-$$";
41print "ok 5\n";
42
43unlink "file-$$";