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