source: trunk/essentials/dev-lang/perl/ext/Digest/MD5/t/badfile.t

Last change on this file was 3181, checked in by bird, 19 years ago

perl 5.8.8

File size: 329 bytes
Line 
1print "1..2\n";
2
3use Digest::MD5 ();
4
5$md5 = Digest::MD5->new;
6
7eval {
8 use vars qw(*FOO);
9 $md5->addfile(*FOO);
10};
11print "not " unless $@ =~ /^Bad filehandle: FOO at/;
12print "ok 1\n";
13
14open(BAR, "no-existing-file.$$");
15eval {
16 $md5->addfile(*BAR);
17};
18print "not " unless $@ =~ /^No filehandle passed at/;
19print "ok 2\n";
Note: See TracBrowser for help on using the repository browser.