This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Text::Tabs: skip failing test file for now
[perl5.git] / ext / XS-APItest / t / eval-filter.t
CommitLineData
27fcb6ee
FC
1#!perl -w
2use strict;
3
60d63348 4use Test::More tests => 5;
27fcb6ee
FC
5use XS::APItest;
6
f1c31c52
FC
7{
8 use feature "unicode_eval";
9 my $unfiltered_foo = "foo";
60d63348
FC
10 BEGIN {
11 eval "BEGIN { filter() }";
12 like $@, qr/^Source filters apply only to byte streams at /,
f1c31c52 13 'filters die under unicode_eval';
60d63348 14 }
f1c31c52 15 is "foo", $unfiltered_foo, 'filters leak not out of unicode evals';
60d63348
FC
16
17 use feature "evalbytes";
18 our $thingy;
19 BEGIN { evalbytes "BEGIN { filter() }\n\$thingy = 'foo'" }
20 is $thingy, "fee",
21 "source filters apply to evalbytten strings";
22 is "foo", $unfiltered_foo, 'filters leak not out of byte evals';
f1c31c52
FC
23}
24
27fcb6ee
FC
25BEGIN { eval "BEGIN{ filter() }" }
26
27is "foo", "fee", "evals share filters with the currently compiling scope";
28# See [perl #87064].