diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-12-03 03:02:54 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-12-03 03:02:54 +0000 |
commit | ba0a2090f574df90404f8a0bbe689389ce0ebcab (patch) | |
tree | 53f8d0ad53e5fc0f05d68a0073273080ef5bd392 /gnu/usr.bin/perl/ext/I18N | |
parent | 0121b80e4f69c2ad9631e8d20b5c91f3b2a40434 (diff) |
Resolve conflicts for perl 5.8.2, remove old files, and add OpenBSD-specific scaffolding
Diffstat (limited to 'gnu/usr.bin/perl/ext/I18N')
-rw-r--r-- | gnu/usr.bin/perl/ext/I18N/Langinfo/Langinfo.t | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/gnu/usr.bin/perl/ext/I18N/Langinfo/Langinfo.t b/gnu/usr.bin/perl/ext/I18N/Langinfo/Langinfo.t deleted file mode 100644 index 2061b7cddc2..00000000000 --- a/gnu/usr.bin/perl/ext/I18N/Langinfo/Langinfo.t +++ /dev/null @@ -1,71 +0,0 @@ -#!./perl - -BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; - require Config; import Config; - if ($Config{'extensions'} !~ m!\bI18N/Langinfo\b! || - $Config{'extensions'} !~ m!\bPOSIX\b!) - { - print "1..0 # skip: I18N::Langinfo or POSIX unavailable\n"; - exit 0; - } -} - -use I18N::Langinfo qw(langinfo); -use POSIX qw(setlocale LC_ALL); - -setlocale(LC_ALL, $ENV{LC_ALL} = $ENV{LANG} = "C"); - -print "1..1\n"; # We loaded okay. That's about all we can hope for. -print "ok 1\n"; -exit(0); - -# Background: the langinfo() (in C known as nl_langinfo()) interface -# is supposed to be a portable way to fetch various language/country -# (locale) dependent constants like "the first day of the week" or -# "the decimal separator". Give a portable (numeric) constant, -# get back a language-specific string. That's a comforting fantasy. -# Now tune in for blunt reality: vendors seem to have implemented for -# those constants whatever they felt like implementing. The UNIX -# standard says that one should have the RADIXCHAR constant for the -# decimal separator. Not so for many Linux and BSD implementations. -# One should have the CODESET constant for returning the current -# codeset (say, ISO 8859-1). Not so. So let's give up any real -# testing (leave the old testing code here for old times' sake, -# though.) --jhi - -my %want = - ( - ABDAY_1 => "Sun", - DAY_1 => "Sunday", - ABMON_1 => "Jan", - MON_1 => "January", - RADIXCHAR => ".", - AM_STR => qr{^(?:am|a\.m\.)$}i, - THOUSEP => "", - D_T_FMT => qr{^%a %b %[de] %H:%M:%S %Y$}, - D_FMT => qr{^%m/%d/%y$}, - T_FMT => qr{^%H:%M:%S$}, - ); - - -my @want = sort keys %want; - -print "1..", scalar @want, "\n"; - -for my $i (1..@want) { - my $try = $want[$i-1]; - eval { I18N::Langinfo->import($try) }; - unless ($@) { - my $got = langinfo(&$try); - if (ref $want{$try} && $got =~ $want{$try} || $got eq $want{$try}) { - print qq[ok $i - $try is "$got"\n]; - } else { - print qq[not ok $i - $try is "$got" not "$want{$try}"\n]; - } - } else { - print qq[ok $i - Skip: $try not defined\n]; - } -} - |