Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgraded Encode from 3.10_01 to 3.12
- Loading branch information
Showing
9 changed files
with
589 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use strict; | ||
use Test::More; | ||
|
||
use Encode; | ||
use File::Temp; | ||
use File::Spec; | ||
|
||
# This test relies on https://github.com/Perl/perl5/issues/10623; | ||
# if that bug is ever fixed then this test may never fail again. | ||
|
||
my $foo = Encode::decode("UTF-16LE", "/\0v\0a\0r\0/\0f\0f\0f\0f\0f\0f\0/\0u\0s\0e\0r\0s\0/\0s\0u\0p\0e\0r\0m\0a\0n\0"); | ||
|
||
my ($fh, $path) = File::Temp::tempfile( CLEANUP => 1 ); | ||
|
||
diag "temp file: $path"; | ||
|
||
# Perl gives the internal PV to exec .. which is buggy/wrong but | ||
# useful here: | ||
system( $^X, '-e', "open my \$fh, '>>', '$path' or die \$!; print {\$fh} \$ARGV[0]", $foo ); | ||
die if $?; | ||
|
||
my $output = do { local $/; <$fh> }; | ||
|
||
is( $output, "/var/ffffff/users/superman", 'UTF-16 decodes with trailing NUL' ); | ||
|
||
done_testing(); |
Oops, something went wrong.