File: die.t

package info (click to toggle)
libwww-mechanize-perl 2.03-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 988 kB
  • sloc: perl: 4,088; makefile: 6
file content (20 lines) | stat: -rw-r--r-- 302 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!perl -T

use warnings;
use strict;

use Test::Exception;
use Test::More;
use WWW::Mechanize ();

dies_ok {
    WWW::Mechanize->new->die('OH NO!  ERROR!');
}
'Expecting to die';

lives_ok {
    WWW::Mechanize->new( onerror => undef )->die('OH NO!  ERROR!');
}
'Not expecting to die';

done_testing();