Created
February 12, 2010 11:23
-
-
Save clairvy/302482 to your computer and use it in GitHub Desktop.
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
#!/opt/local/bin/perl | |
use strict; | |
use warnings; | |
use Test::More tests => 2; | |
my $hoge1 = 'FF330'; | |
my $expect = "\x{FF330}"; | |
my @codes = ( | |
sub {eval '"\x{' . $_[0] . '}"'}, | |
sub {chr(hex($_[0]))}, | |
); | |
foreach my $code (@codes) { | |
my $hoge2 = $code->($hoge1); | |
is($hoge2, $expect); | |
} |
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
test: | |
@prove exp.pl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment