Permalink
Browse files

[t] Add more tests for #956

  • Loading branch information...
1 parent 2253169 commit bd24bcfc482547c4d1f02ea997b8b13635513e72 @leto leto committed Apr 14, 2013
Showing with 26 additions and 0 deletions.
  1. +26 −0 t/op/stringu.t
View
@@ -29,9 +29,35 @@ pir_output_is(<<'CODE',<<'OUTPUT', 'sprintf counts bytes instead of characters G
$S1 = sprintf unicode:"[%20s]", $P0
$I0 = length $S1
say $I0
+
+ $S0 = unicode:"ä"
+ $P0 = new 'ResizablePMCArray'
+ push $P0, $S0
+ $S1 = sprintf unicode:"[%4s]", $P0
+ $I0 = length $S1
+ say $I0
+
+ # this works correctly
+ $S0 = unicode:"ä"
+ $P0 = new 'ResizablePMCArray'
+ push $P0, $S0
+ $S1 = sprintf unicode:"[%1s]", $P0
+ $I0 = length $S1
+ say $I0
+
+ # this works correctly
+ $S0 = unicode:"a"
+ $P0 = new 'ResizablePMCArray'
+ push $P0, $S0
+ $S1 = sprintf unicode:"[%4s]", $P0
+ $I0 = length $S1
+ say $I0
.end
CODE
22
+6
+3
+6
OUTPUT
pir_output_is(<<'CODE',<<'OUTPUT', 'non-ascii immc optimizer GH#837');

0 comments on commit bd24bcf

Please sign in to comment.