4 use Test::More tests => 19;
7 BEGIN {use_ok( "File::Temp" ); }
10 my $fh = new File::Temp();
11 isa_ok ($fh, 'File::Temp');
13 ok( "$fh" ne "foo", "compare stringified object with string");
14 ok( $fh ne "foo", "compare object with string");
15 ok( $fh eq $fh, "compare eq with self");
17 ok( $fh != 0, "compare != 0");
18 ok( $fh == $fh, "compare == with self");
19 ok( $fh != \*STDOUT, "compare != \*STDOUT");
23 like ($num, qr/^\d+$/, '+0 is a number');
27 unlike ($str, qr/^\d+$/, '"" is not a number');
32 my $fh = File::Temp->newdir();
33 isa_ok ($fh, 'File::Temp::Dir');
35 ok( "$fh" ne "foo", "compare stringified object with string");
36 ok( $fh ne "foo", "compare object with string");
37 ok( $fh eq $fh, "compare eq with self");
39 ok( $fh != 0, "compare != 0");
40 ok( $fh == $fh, "compare == with self");
41 ok( $fh != \*STDOUT, "compare != \*STDOUT");
45 like ($num, qr/^\d+$/, '+0 is a number');
49 unlike ($str, qr/^\d+$/, '"" is not a number');