Linux cpanel2.daytoncreative.net 2.6.32-754.29.2.el6.x86_64 #1 SMP Tue May 12 17:39:04 UTC 2020 x86_64
Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4
Server IP : 70.62.220.67 & Your IP : 216.73.216.193
Domains :
Cant Read [ /etc/named.conf ]
User : michaelgreg
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
log /
perl-5.20.2 /
dist /
I18N-LangTags /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
01_about_verbose.t
2.2
KB
-r--r--r--
2014-12-27 11:48
05_main.t
1.76
KB
-r--r--r--
2014-12-27 11:48
07_listy.t
712
B
-r--r--r--
2014-12-27 11:48
10_http.t
3.07
KB
-r--r--r--
2014-12-27 11:48
20_locales.t
975
B
-r--r--r--
2014-12-27 11:48
50_super.t
1.94
KB
-r--r--r--
2014-12-27 11:48
55_supers_strict.t
1.51
KB
-r--r--r--
2014-12-27 11:48
80_all_env.t
1.71
KB
-r--r--r--
2014-12-27 11:48
Save
Rename
use strict; use Test::More tests => 17; BEGIN {use_ok('I18N::LangTags::Detect', 1.01);} note("Using I18N::LangTags::Detect v$I18N::LangTags::Detect::VERSION"); note("Make sure we can assign to ENV entries"); note("Otherwise we can't run the subsequent tests"); $ENV{'MYORP'} = 'Zing'; is($ENV{'MYORP'}, 'Zing'); $ENV{'SWUZ'} = 'KLORTHO HOOBOY'; is($ENV{'SWUZ'}, 'KLORTHO HOOBOY'); delete $ENV{'MYORP'}; delete $ENV{'SWUZ'}; sub printenv { print "# ENV:\n"; foreach my $k (sort keys %ENV) { my $p = $ENV{$k}; $p =~ s/\n/\n#/g; print "# [$k] = [$p]\n"; } print "# [end of ENV]\n#\n"; } $ENV{'IGNORE_WIN32_LOCALE'} = 1; # a hack, just for testing's sake. foreach my $test_var (qw (LANGUAGE LC_ALL LC_MESSAGES LANG)) { $ENV{$_} = '' foreach qw(REQUEST_METHOD LANGUAGE LC_ALL LC_MESSAGES LANG); $ENV{$test_var} = 'Eu-MT'; my $what = "I18N::LangTags::Detect::detect() for \$ENV{$test_var} = 'Eu-MT'"; printenv(); is(scalar I18N::LangTags::Detect::detect(), "eu-mt", "scalar $what"); is_deeply([I18N::LangTags::Detect::detect()], ["eu-mt"], $what); } note("Test HTTP_ACCEPT_LANGUAGE"); $ENV{'REQUEST_METHOD'} = 'GET'; foreach(['eu-MT', "eu-mt"], ['x-plorp, zaz, eu-MT, i-klung', 'x-plorp', 'i-plorp', 'zaz', 'eu-mt', 'i-klung', 'x-klung'], ['x-plorp, zaz, eU-Mt, i-klung', 'x-plorp', 'i-plorp', 'zaz', 'eu-mt', 'i-klung', 'x-klung'], ) { my ($val, @expect) = @$_; my $what = "I18N::LangTags::Detect::detect() for \$ENV{HTTP_ACCEPT_LANGUAGE} = '$val'"; $ENV{'HTTP_ACCEPT_LANGUAGE'} = $val; printenv(); is(scalar I18N::LangTags::Detect::detect(), $expect[0], "scalar $what"); is_deeply([I18N::LangTags::Detect::detect()], \@expect, $what); }