File: number-phone-country-warnings.t

package info (click to toggle)
libnumber-phone-perl 4.0008-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,772 kB
  • sloc: perl: 1,954; makefile: 6
file content (28 lines) | stat: -rw-r--r-- 749 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use strict;
use warnings;

# plan here, don't use done_testing, as the tests will only
# get run if warnings are caught
use Test::More;

BEGIN { $SIG{__WARN__} = sub {
    is(
        shift(),
        "Deprecated, will become fatal: Unknown param to Number::Phone::Country 'wibble' at t/number-phone-country-warnings.t line 16\n",
        "Number::Phone::Country warns about bogus params"
    );
} } 

use Number::Phone::Country qw(wibble);

BEGIN { $SIG{__WARN__} = sub {
    is(
        shift(),
        "'noexport' param to Number::Phone::Country is deprecated at t/number-phone-country-warnings.t line 26\n",
        "Number::Phone::Country warns about deprecated 'noexport'"
    );
} } 

use Number::Phone::Country qw(noexport);

done_testing;