This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
dist/Safe/t/safeutf8.t: Generalize to non-ASCII platform
authorKarl Williamson <public@khwilliamson.com>
Tue, 16 Apr 2013 18:02:26 +0000 (12:02 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 9 Mar 2015 21:19:57 +0000 (15:19 -0600)
dist/Safe/t/safeutf8.t

index 42b84ef..6521c9c 100644 (file)
@@ -21,7 +21,7 @@ $safe->deny_only();
 # Expression that triggers require utf8 and call to SWASHNEW.
 # Fails with "Undefined subroutine PLPerl::utf8::SWASHNEW called"
 # if SWASHNEW is not shared, else returns true if unicode logic is working.
-my $trigger = q{ my $a = pack('U',0xC4); my $b = chr 0xE4; utf8::upgrade $b; $a =~ /$b/i };
+my $trigger = q{ my $a = pack('U',0xC4); my $b = chr utf8::unicode_to_native(0xE4); utf8::upgrade $b; $a =~ /$b/i };
 
 ok $safe->reval( $trigger ), 'trigger expression should return true';
 is $@, '', 'trigger expression should not die';