projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
More standard library test scripts
[p5sagit/p5-mst-13.2.git]
/
t
/
lib
/
filecopy.t
1
#!./perl
2
3
BEGIN {
4
chdir 't' if -d 't';
5
@INC = '../lib';
6
}
7
8
print "1..3\n";
9
10
$| = 1;
11
12
use File::Copy;
13
14
# First we create a file
15
open(F, ">file-$$") or die;
16
print F "ok 3\n";
17
close F;
18
19
copy "file-$$", "copy-$$";
20
21
open(F, "copy-$$") or die;
22
$foo = <F>;
23
close(F);
24
25
print "not " if -s "file-$$" != -s "copy-$$";
26
print "ok 1\n";
27
28
print "not " unless $foo eq "ok 3\n";
29
print "ok 2\n";
30
31
copy "copy-$$", \*STDOUT;
32
33
unlink "file-$$";
34
unlink "copy-$$";