re.t: Use portable C locale
authorKarl Williamson <public@khwilliamson.com>
Thu, 16 Dec 2010 15:34:35 +0000 (08:34 -0700)
committerTony Cook <tony@develop-help.com>
Fri, 17 Dec 2010 23:36:08 +0000 (10:36 +1100)
The locale en_US.UTF-8 has varying and wrong definitions depending on
manufacturer.  Using the portable C locale works just as well for the
purposes of these tests.

t/re/re.t

index 49866bd..f6da280 100644 (file)
--- a/t/re/re.t
+++ b/t/re/re.t
@@ -95,9 +95,9 @@ if ('1234'=~/(?:(?<A>\d)|(?<C>!))(?<B>\d)(?<A>\d)(?<B>\d)/){
     }
 
     SKIP: {
-        my $current_locale = POSIX::setlocale( &POSIX::LC_CTYPE, 'en_US.UTF-8' );
-        if ( !$current_locale || $current_locale ne 'en_US.UTF-8' ) {
-            skip( 'cannot use locale en_US.UTF-8', 3 );
+        my $current_locale = POSIX::setlocale( &POSIX::LC_CTYPE, 'C' );
+        if ( !$current_locale || $current_locale ne 'C' ) {
+            skip( 'cannot set locale C', 3 );
         }
 
         $check = $text =~ /(?u)\w/;