Commit 485f340d authored by Fred Drake's avatar Fred Drake

Buffer-object repitition and concatenation has worked all along; add a test

to make avoid regression.
parent eb2b8334
......@@ -522,6 +522,12 @@ hash(a)
b = a * 5
if a == b:
raise TestFailed, 'buffers should not be equal'
if str(b) != ('asdf' * 5):
raise TestFailed, 'repeated buffer has wrong content'
if str(a * 0) != '':
raise TestFailed, 'repeated buffer zero times has wrong content'
if str(a + buffer('def')) != 'asdfdef':
raise TestFailed, 'concatenation of buffers yields wrong content'
try: a[1] = 'g'
except TypeError: pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment