3 # at least in the CPAN version we're sometimes called with -w, for example
4 # during 'make test', so disable them explicitly and only turn them on again for
5 # the deprecation test.
10 require Config; import Config;
11 if (!$::Config{d_setlocale} || $::Config{ccflags} =~ /\bD?NO_LOCALE\b/) {
17 use Test::More tests => 7;
19 BEGIN {use_ok('I18N::Collate');}
21 $a = I18N::Collate->new("foo");
23 isa_ok($a, 'I18N::Collate');
27 local $SIG{__WARN__} = sub { $@ = $_[0] };
28 $b = I18N::Collate->new("foo");
29 like($@, qr/\bHAS BEEN DEPRECATED\b/);
33 is($a, $b, 'same object');
35 $b = I18N::Collate->new("bar");
36 unlike($@, qr/\bHAS BEEN DEPRECATED\b/);
38 isnt($a, $b, 'different object');
40 cmp_ok($a lt $b, '!=', $a gt $b);