From 5686f3781c5c64f64656b7431420d67b2607a33a Mon Sep 17 00:00:00 2001
From: Martin Stjernholm <mast@lysator.liu.se>
Date: Mon, 7 Apr 2003 17:27:20 +0200
Subject: [PATCH] Test a bug in String.Buffer.`+ on wide large strings.

Rev: lib/modules/String.pmod/testsuite.in:1.7
---
 lib/modules/String.pmod/testsuite.in | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/lib/modules/String.pmod/testsuite.in b/lib/modules/String.pmod/testsuite.in
index fc17f9cc7d..efeae2324e 100644
--- a/lib/modules/String.pmod/testsuite.in
+++ b/lib/modules/String.pmod/testsuite.in
@@ -1,4 +1,4 @@
-dnl $Id: testsuite.in,v 1.6 2003/03/12 17:01:52 nisse Exp $
+dnl $Id: testsuite.in,v 1.7 2003/04/07 15:27:20 mast Exp $
 
 test_eq([[ String.Buffer()->add("xxx") ]], 3)
 test_any([[
@@ -42,7 +42,17 @@ test_any([[
   s->add("abcde");
   return sizeof(s);
 ]], 5)
-dnl MISSING TEST: `+ not tested
+test_any([[
+  String.Buffer b = String.Buffer(), c = b;
+  string teststr = map (indices (allocate (3000)),
+			lambda (int i) {
+			  return "\1234" + i;
+			}) * ",";
+  b = b + teststr;
+  b = b + "end";
+  return teststr + "end" == b->get();
+]], 1)
+
 test_eval_error([[ String.Buffer()->add("x",0); ]])
 
 test_eq([[ String.count( "", "a" ) ]], 0)
-- 
GitLab