summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2000-07-11 20:55:38 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2000-07-11 20:55:38 (GMT)
commit88887aa38eee7d6c12c5f5a108b6a0a4302d7ae5 (patch)
tree87bd975cf41ab8b763637798af42f76abca03fd8 /Lib/test
parent672fac0d65327f6f39013d34dc196ac010e86acd (diff)
downloadcpython-88887aa38eee7d6c12c5f5a108b6a0a4302d7ae5.zip
cpython-88887aa38eee7d6c12c5f5a108b6a0a4302d7ae5.tar.gz
cpython-88887aa38eee7d6c12c5f5a108b6a0a4302d7ae5.tar.bz2
small updates to string_join:
use PyString_AS_STRING macro on local string object when resizing string, make sure resized string will always be big enough split string containing error message across two lines add test to string_tests that causes resizing
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/string_tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index e9168ef..d4041be 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -123,6 +123,9 @@ def run_method_tests(test):
test('join', '.', u'a.b.c', ['a', u'b', 'c'])
test('join', '.', u'a.b.c', ['a', 'b', u'c'])
test('join', '.', TypeError, ['a', u'b', 3])
+ for i in [5, 25, 125]:
+ test('join', '-', ((('a' * i) + '-') * i)[:-1],
+ ['a' * i] * i)
test('join', ' ', TypeError, BadSeq1())
test('join', ' ', 'a b c', BadSeq2())