From: Jarkko Hietaniemi Date: Sun, 25 Jul 1999 19:06:59 +0000 (+0000) Subject: Recode locale.t so that the change in #3730 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f9cbebe1529365fa24b4bfbacdcdacd498d1cc75;p=p5sagit%2Fp5-mst-13.2.git Recode locale.t so that the change in #3730 is not needed and locale.t works both without and with the utf8 pragma. p4raw-id: //depot/cfgperl@3748 --- diff --git a/MANIFEST b/MANIFEST index 9adb74c..89e480e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1313,7 +1313,9 @@ t/pod/testcmp.pl Module to compare output against expected results t/pod/testp2pt.pl Module to test Pod::PlainText for a given file t/pod/testpchk.pl Module to test Pod::Checker for a given file t/pragma/constant.t See if compile-time constants work -t/pragma/locale.t See if locale support (i18n and l10n) works +t/pragma/locale.t See if locale support works +t/pragma/locale/latin1 Part of locale.t in Latin 1 +t/pragma/locale/utf8 Part of locale.t in UTF8 t/pragma/overload.t See if operator overloading works t/pragma/strict-refs Tests of "use strict 'refs'" for strict.t t/pragma/strict-subs Tests of "use strict 'subs'" for strict.t diff --git a/t/pragma/locale.t b/t/pragma/locale.t index 4999617..82adcf3 100755 --- a/t/pragma/locale.t +++ b/t/pragma/locale.t @@ -3,6 +3,7 @@ BEGIN { chdir 't' if -d 't'; unshift @INC, '../lib'; + unshift @INC, '.'; require Config; import Config; if (!$Config{d_setlocale} || $Config{ccflags} =~ /\bD?NO_LOCALE\b/) { print "1..0\n"; @@ -11,7 +12,6 @@ BEGIN { } use strict; -no utf8; my $debug = 1; @@ -242,7 +242,6 @@ Afrikaans:af:za:1 15 Arabic:ar:dz eg sa:6 arabic8 Brezhoneg Breton:br:fr:1 15 Bulgarski Bulgarian:bg:bg:5 -Català Catalan:ca:es:1 15 Chinese:zh:cn tw:cn.EUC eucCN eucTW euc.CN euc.TW GB2312 tw.EUC Hrvatski Croatian:hr:hr:2 Cymraeg Welsh:cy:cy:1 14 15 @@ -254,24 +253,19 @@ Esperanto:eo:eo:3 Eesti Estonian:et:ee:4 6 13 Suomi Finnish:fi:fi:1 15 Flamish::fl:1 15 -Français French:fr:be ca ch fr lu:1 15 Deutsch German:de:at be ch de lu:1 15 Euskaraz Basque:eu:es fr:1 15 -Gáidhlig Gaelic:gd:gb uk:1 14 15 Galego Galician:gl:es:1 15 Ellada Greek:el:gr:7 g8 -Føroyskt Faroese:fo:fo:1 15 Frysk:fy:nl:1 15 Greenlandic:kl:gl:4 6 Hebrew:iw:il:8 hebrew8 Hungarian:hu:hu:2 -Íslensku Icelandic:is:is:1 15 Indonesian:in:id:1 15 Gaeilge Irish:ga:IE:1 14 15 Italiano Italian:it:ch it:1 15 Nihongo Japanese:ja:jp:euc eucJP jp.EUC sjis Korean:ko:kr: -Sámi Lappish:::4 6 13 Latine Latin:la:va:1 15 Latvian:lv:lv:4 6 13 Lithuanian:lt:lt:4 6 13 @@ -280,13 +274,11 @@ Maltese:mt:mt:3 Norsk Norwegian:no:no:1 15 Occitan:oc:es:1 15 Polski Polish:pl:pl:2 -Português Portuguese:po:po br:1 15 Rumanian:ro:ro:2 Russki Russian:ru:ru su ua:5 koi8 koi8r koi8u cp1251 Serbski Serbian:sr:yu:5 Slovak:sk:sk:2 Slovene Slovenian:sl:si:2 -Espanõl Spanish:es:ar bo cl co cr do ec es gt hn mx ni pa pe py sv uy ve:1 15 Sqhip Albanian:sq:sq:1 15 Svenska Swedish:sv:fi se:1 15 Thai:th:th:11 tis620 @@ -294,6 +286,14 @@ Turkish:tr:tr:9 turkish8 Yiddish:::1 15 EOF +sub in_utf8 () { $^H & 0x08 } + +if (in_utf8) { + require "pragma/locale/utf8"; +} else { + require "pragma/locale/latin1"; +} + my @Locale; my $Locale; my @Alnum_; diff --git a/t/pragma/locale/latin1 b/t/pragma/locale/latin1 new file mode 100644 index 0000000..f40f732 --- /dev/null +++ b/t/pragma/locale/latin1 @@ -0,0 +1,10 @@ +$locales .= <