1#!./perl
2
3use strict;
4use warnings;
5no warnings 'once';
6
7BEGIN {
8    chdir 't' if -d 't';
9    require './test.pl';
10    set_up_inc('../lib');
11    require './loc_tools.pl';
12}
13
14skip_all "No locales" unless locales_enabled('LC_CTYPE');
15
16my $current_locale = POSIX::setlocale( &POSIX::LC_CTYPE, "C") // "";
17skip_all "Couldn't set locale to C" unless $current_locale eq 'C';
18
19use locale;
20
21# Some implementations don't have the 128-255 range characters all
22# mean nothing under the C locale (an example being VMS).  This is
23# legal, but since we don't know what the right answers should be,
24# skip the locale tests in that situation.
25for my $i (128 .. 255) {
26    my $char = chr(utf8::unicode_to_native($i));
27    skip_all "C locale doesn't behave as expected" if uc($char) ne $char
28                                                   || lc($char) ne $char;
29}
30
31$::TEST_CHUNK = 'l';
32
33do './re/fold_grind.pl';
34print STDERR "$@\n" if $@;
35print STDERR "$!\n" if $!;
36
371;
38
39#
40# ex: set ts=8 sts=4 sw=4 et:
41#
42