Commit | Line | Data |
8fda97d5 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Test::More; |
7 | use Test::Warn; |
8 | use DBIx::Class::Carp; |
9 | use lib 't/lib'; |
10 | use DBICTest; |
11 | |
12 | warnings_exist { |
13 | DBIx::Class::frobnicate(); |
14 | } [ |
15 | qr/carp1/, |
16 | qr/carp2/, |
17 | ], 'expected warnings from carp_once'; |
18 | |
19 | done_testing; |
20 | |
21 | sub DBIx::Class::frobnicate { |
22 | DBIx::Class::branch1(); |
23 | DBIx::Class::branch2(); |
24 | } |
25 | |
26 | sub DBIx::Class::branch1 { carp_once 'carp1' } |
27 | sub DBIx::Class::branch2 { carp_once 'carp2' } |