This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make setting ${^ENCODING} to a defined value fatal
[perl5.git] / t / uni / heavy.t
diff --git a/t/uni/heavy.t b/t/uni/heavy.t
deleted file mode 100644 (file)
index ada3140..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#!./perl -w
-# tests that utf8_heavy.pl doesn't use anything that prevents it loading
-BEGIN {
-    chdir 't' if -d 't';
-    require './test.pl';
-    set_up_inc('../lib');
-}
-
-plan tests => 1;
-
-# see [perl #126593]
-fresh_perl_is(<<'EOP', "", { stderr => 1 }, "doesn't break with \${^ENCODING}");
-no warnings qw(deprecated);
-package Foo;
-sub cat_decode {
-    # stolen from Encode.pm
-    my ( undef, undef, undef, $pos, $trm ) = @_;
-    my ( $rdst, $rsrc, $rpos ) = \@_[ 1, 2, 3 ];
-    use bytes;
-    if ( ( my $npos = index( $$rsrc, $trm, $pos ) ) >= 0 ) {
-        $$rdst .=
-          substr( $$rsrc, $pos, $npos - $pos + length($trm) );
-        $$rpos = $npos + length($trm);
-        return 1;
-    }
-    $$rdst .= substr( $$rsrc, $pos );
-    $$rpos = length($$rsrc);
-    return q();
-}
-
-sub decode {
-   my (undef, $tmp) = @_;
-   utf8::decode($tmp);
-   $tmp;
-}
-
-BEGIN { ${^ENCODING} = bless [], q(Foo) };
-
-(my $tmp = q(abc)) =~ tr/abc/123/;
-EOP