diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-16 19:58:29 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-16 19:58:29 +0000 |
commit | 532e0e8e5050ac4d94137112aa8d8c5283cba92b (patch) | |
tree | af388700b56aa0ec028b961c100a2565d4c69e85 /t/lib | |
parent | 13e84f2cd82070025f693c9ec7355d019e2f10ff (diff) | |
download | perl-532e0e8e5050ac4d94137112aa8d8c5283cba92b.tar.gz |
I think this is quite enough testing for a deprecated feature.
p4raw-id: //depot/perl@10140
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/1_compile.t | 1 | ||||
-rw-r--r-- | t/lib/i18n-collate.t | 44 |
2 files changed, 45 insertions, 0 deletions
diff --git a/t/lib/1_compile.t b/t/lib/1_compile.t index 75801bb945..f1196f42f9 100644 --- a/t/lib/1_compile.t +++ b/t/lib/1_compile.t @@ -158,6 +158,7 @@ FindBin GDBM_File Getopt::Long Getopt::Std +I18N:Collate IO::Dir IO::File IO::Handle diff --git a/t/lib/i18n-collate.t b/t/lib/i18n-collate.t new file mode 100644 index 0000000000..bf3ba20b6a --- /dev/null +++ b/t/lib/i18n-collate.t @@ -0,0 +1,44 @@ +#!./perl + +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; + require Config; import Config; + if (!$Config{d_setlocale} || $Config{ccflags} =~ /\bD?NO_LOCALE\b/) { + print "1..0\n"; + exit; + } +} + +print "1..7\n"; + +use I18N::Collate; + +print "ok 1\n"; + +$a = I18N::Collate->new("foo"); + +print "ok 2\n"; + +{ + use warnings; + local $SIG{__WARN__} = sub { $@ = $_[0] }; + $b = I18N::Collate->new("foo"); + print "not " unless $@ =~ /\bHAS BEEN DEPRECATED\b/; + print "ok 3\n"; + $@ = ''; +} + +print "not " unless $a eq $b; +print "ok 4\n"; + +$b = I18N::Collate->new("bar"); +print "not " if $@ =~ /\bHAS BEEN DEPRECATED\b/; +print "ok 5\n"; + +print "not " if $a eq $b; +print "ok 6\n"; + +print "not " if $a lt $b == $a gt $b; +print "ok 7\n"; + |