xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/lib/ExtUtils/t/bytes.t (revision 0:68f95e015346)
1#!/usr/bin/perl -w
2
3BEGIN {
4    if( $ENV{PERL_CORE} ) {
5        chdir 't' if -d 't';
6        @INC = ('../lib', 'lib');
7    }
8    else {
9        unshift @INC, 't/lib';
10    }
11}
12
13use strict;
14use Test::More tests => 4;
15
16use_ok('ExtUtils::MakeMaker::bytes');
17
18SKIP: {
19    skip "bytes.pm appeared in 5.6", 3 if $] < 5.006;
20
21    my $chr = chr(400);
22    is( length $chr, 1 );
23
24    {
25        use ExtUtils::MakeMaker::bytes;
26        is( length $chr, 2, 'byte.pm in effect' );
27    }
28
29    is( length $chr, 1, '  score is lexical' );
30}
31