Browse files

add a test to ensure utf8 codepoints come out right

not, for example, negative or off-by-one.
  • Loading branch information...
timo committed Jul 23, 2013
1 parent ef215fd commit 2b3c0d429ecc55ac68672479ba30f3d43cd45522
Showing with 3 additions and 0 deletions.
  1. +3 −0 S32-str/encode.t
@@ -20,6 +20,9 @@ is_deeply 'abc'.encode()[1, 2], (98, 99), 'can slice-index a Buf';
ok ('ä'.encode('UTF-8', 'D') eqv<61>, :16<cc>, :16<88>)),
'encoding to UTF-8, with NFD';
+ok ('ä'.encode('UTF-8') eqv<c3>, :16<a4>)),
+ 'encoding ä utf8 gives correct numbers';
ok, 182).decode ~~ Str, '.decode returns a Str';
is, 182).decode, 'ö', 'decoding a Buf with UTF-8';
is'ISO-8859-1'), 'ö', 'decoding a Buf with Latin-1';

0 comments on commit 2b3c0d4

Please sign in to comment.