Skip to content

Commit

Permalink
Safe: safeutf8.t: Generalize for EBCDIC
Browse files Browse the repository at this point in the history
Use a code point in the test that is equally valid on EBCDIC machines
  • Loading branch information
khwilliamson committed Jul 25, 2021
1 parent 0b8a831 commit 010b61f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/Safe/t/safeutf8.t
Expand Up @@ -22,13 +22,13 @@ $safe->deny_only();
# Fails with "Undefined subroutine PLPerl::utf8::SWASHNEW called"
# if SWASHNEW is not shared, else returns true if unicode logic is working.
# (For early Perls we don't take into account EBCDIC, so will fail there
my $trigger = q{ my $a = pack('U',0xC4); $a =~ tr/\x{1234}//rd };
my $trigger = q{ my $a = pack('U',0xB6); $a =~ tr/\x{1234}//rd };

ok $safe->reval( $trigger ), 'trigger expression should return true';
is $@, '', 'trigger expression should not die';

# return a closure
my $sub = $safe->reval(q{sub { warn pack('U',0xC4) }});
my $sub = $safe->reval(q{sub { warn pack('U',0xB6) }});

# define code outside Safe that'll be triggered from inside
my @warns;
Expand Down

0 comments on commit 010b61f

Please sign in to comment.