[svn:parrot] r49075 - trunk/t/op

nwellnhof at svn.parrot.org nwellnhof at svn.parrot.org
Fri Sep 17 02:19:08 UTC 2010


Author: nwellnhof
Date: Fri Sep 17 02:19:08 2010
New Revision: 49075
URL: https://trac.parrot.org/parrot/changeset/49075

Log:
[str] Add test for r49074

Modified:
   trunk/t/op/string_cs.t

Modified: trunk/t/op/string_cs.t
==============================================================================
--- trunk/t/op/string_cs.t	Fri Sep 17 00:41:22 2010	(r49074)
+++ trunk/t/op/string_cs.t	Fri Sep 17 02:19:08 2010	(r49075)
@@ -6,7 +6,7 @@
 use warnings;
 use lib qw( . lib ../lib ../../lib );
 use Test::More;
-use Parrot::Test tests => 49;
+use Parrot::Test tests => 50;
 use Parrot::Config;
 
 =head1 NAME
@@ -408,6 +408,34 @@
 abcdefg
 OUTPUT
 
+pir_output_is( <<'CODE', <<OUTPUT, "concat ascii, utf8 preallocated" );
+.sub main
+    .local string s, t
+    s = repeat "abcd", 100
+    t = "efg"
+    s = s . t
+    s = s . t
+    s = s . t
+    s = s . t
+    t = utf8:"hi\xa9jk"
+    s = s . t
+    $I0 = encoding s
+    $S0 = encodingname $I0
+    print $S0
+    print "\n"
+    $I0 = length s
+    print $I0
+    print "\n"
+    s = substr s, -21
+    print s
+    print "\n"
+.end
+CODE
+utf8
+417
+abcdefgefgefgefghi\xc2\xa9jk
+OUTPUT
+
 SKIP: {
     skip( 'no ICU lib', 19 ) unless $PConfig{has_icu};
 


More information about the parrot-commits mailing list