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
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 @@
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())