Skip to content

Commit

Permalink
[t] Add tests for conversion to UCS-4
Browse files Browse the repository at this point in the history
  • Loading branch information
nwellnhof committed Nov 30, 2010
1 parent d2a80a7 commit 856c6e5
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion t/op/string_cs.t
Expand Up @@ -5,7 +5,7 @@ use strict;
use warnings;
use lib qw( . lib ../lib ../../lib );
use Test::More;
use Parrot::Test tests => 53;
use Parrot::Test tests => 55;
use Parrot::Config;

=head1 NAME
Expand Down Expand Up @@ -388,6 +388,48 @@ CODE
/Lossy conversion/
OUTPUT

pasm_output_is( <<'CODE', <<OUTPUT, "trans_encoding_s_s_i iso-8859-1 to ucs4" );
set S0, iso-8859-1:"abc_ä_"
find_encoding I0, "ucs4"
trans_encoding S1, S0, I0
iseq I1, S0, S1
print I1
print "\n"
encoding I0, S1
encodingname S2, I0
print S2
print "\n"
length I2, S1
print I2
print "\n"
end
CODE
1
ucs4
6
OUTPUT

pasm_output_is( <<'CODE', <<OUTPUT, "trans_encoding_s_s_i utf8 to ucs4" );
set S0, utf8:"\x{fc}_\x{20202}"
find_encoding I0, "ucs4"
trans_encoding S1, S0, I0
iseq I1, S0, S1
print I1
print "\n"
encoding I0, S1
encodingname S2, I0
print S2
print "\n"
length I2, S1
print I2
print "\n"
end
CODE
1
ucs4
3
OUTPUT

pir_output_is( <<'CODE', <<'OUTPUT', "bug #34661 literal" );
.sub main :main
$S0 = utf8:"\"]\nif I3 == "
Expand Down

0 comments on commit 856c6e5

Please sign in to comment.