xref: /openbsd-src/gnu/usr.bin/perl/t/op/fresh_perl_utf8.t (revision 5759b3d249badf144a6240f7eec4dcf9df003e6b)
1898184e3Ssthen#!./perl
2898184e3Ssthen
3898184e3Ssthen#This file is intentionally written in UTF-8
4898184e3Ssthen
5898184e3SsthenBEGIN {
6898184e3Ssthen    chdir 't' if -d 't';
7898184e3Ssthen    require './test.pl';
8*5759b3d2Safresh1    set_up_inc('../lib');
9898184e3Ssthen}
10898184e3Ssthen
11898184e3Ssthenplan 1;
12898184e3Ssthen
13898184e3Ssthenuse utf8;
14898184e3Ssthenuse strict;
15898184e3Ssthenuse open qw( :utf8 :std );
16898184e3Ssthen
17898184e3Ssthen{
18898184e3Ssthen    local $@;
19898184e3Ssthen    eval 'sub testme { my $ᨕ = "test"; { local $ᨕ = "new test"; print $ᨕ } }';
20898184e3Ssthen    like( $@, qr/Can't localize lexical variable \$ᨕ at /u, q!"Can't localize lexical" error is in UTF-8! );
21898184e3Ssthen}
22