File: | t/00_load/01_load-conflict.t |
Coverage: | 100.0% |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #!perl | ||||||
2 | |||||||
3 | 1 1 1 | 22990 3 59 | use strict; | ||||
4 | 1 1 1 | 4 1 38 | use warnings; | ||||
5 | |||||||
6 | 1 1 1 | 630 40755 9 | use Test::More tests => 2; | ||||
7 | 1 1 1 | 1547 3537 6 | use Test::Exception; | ||||
8 | |||||||
9 | # fixture: set up a conflicting underscore package | ||||||
10 | { | ||||||
11 | |||||||
12 | 1 | 156104 | package _; | ||||
13 | sub foo; | ||||||
14 | } | ||||||
15 | |||||||
16 | 1 | 5 | ok ! defined $INC{'Util/Underscore.pm'}, 'Util::Underscore has not been loaded'; | ||||
17 | |||||||
18 | 1 | 613 | throws_ok { require Util::Underscore } | ||||
19 | 1 | 1041 | qr/\AThe package "_" has already been defined/; |