This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add new OPpEVAL flags to B::Concise
[perl5.git] / ext / XS-APItest / t / eval-filter.t
CommitLineData
27fcb6ee
FC
1#!perl -w
2use strict;
3
f1c31c52 4use Test::More tests => 3;
27fcb6ee
FC
5use XS::APItest;
6
f1c31c52
FC
7{
8 use feature "unicode_eval";
9 my $unfiltered_foo = "foo";
10 eval "BEGIN { filter() }";
11 like $@, qr/^Source filters apply only to byte streams at /,
12 'filters die under unicode_eval';
13 is "foo", $unfiltered_foo, 'filters leak not out of unicode evals';
14}
15
27fcb6ee
FC
16BEGIN { eval "BEGIN{ filter() }" }
17
18is "foo", "fee", "evals share filters with the currently compiling scope";
19# See [perl #87064].