source:
trunk/essentials/dev-lang/perl/ext/Digest/MD5/t/badfile.t
| Last change on this file was 3181, checked in by , 19 years ago | |
|---|---|
| File size: 329 bytes | |
| Line | |
|---|---|
| 1 | print "1..2\n"; |
| 2 | |
| 3 | use Digest::MD5 (); |
| 4 | |
| 5 | $md5 = Digest::MD5->new; |
| 6 | |
| 7 | eval { |
| 8 | use vars qw(*FOO); |
| 9 | $md5->addfile(*FOO); |
| 10 | }; |
| 11 | print "not " unless $@ =~ /^Bad filehandle: FOO at/; |
| 12 | print "ok 1\n"; |
| 13 | |
| 14 | open(BAR, "no-existing-file.$$"); |
| 15 | eval { |
| 16 | $md5->addfile(*BAR); |
| 17 | }; |
| 18 | print "not " unless $@ =~ /^No filehandle passed at/; |
| 19 | print "ok 2\n"; |
Note:
See TracBrowser
for help on using the repository browser.
