6 unless (find PerlIO::Layer 'perlio') {
7 print "1..0 # Skip: not perlio\n";
10 if ($ENV{PERL_CORE_MINITEST}) {
11 print "1..0 # Skip: no dynamic loading on miniperl, no threads\n";
20 my $BOM = chr(0xFEFF);
23 my ($enc, $tag, $bom) = @_;
24 open(UTF_PL, ">:raw:encoding($enc)", "utf.pl")
25 or die "utf.pl($enc,$tag,$bom): $!";
26 print UTF_PL $BOM if $bom;
27 print UTF_PL "$tag\n";
29 my $got = do "./utf.pl";
33 test("utf16le", 123, 1);
34 test("utf16le", 1234, 1);
35 test("utf16le", 12345, 1);
36 test("utf16be", 123, 1);
37 test("utf16be", 1234, 1);
38 test("utf16be", 12345, 1);
40 test("utf8", 1234, 1);
41 test("utf8", 12345, 1);
43 test("utf16le", 123, 0);
44 test("utf16le", 1234, 0);
45 test("utf16le", 12345, 0);
46 test("utf16be", 123, 0);
47 test("utf16be", 1234, 0);
48 test("utf16be", 12345, 0);
51 1 while unlink "utf.pl";