diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-05-09 23:00:26 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-05-09 23:00:26 (GMT) |
commit | 1a7b3eee946183c75eddecafe76c60e87c6f5e7d (patch) | |
tree | f9c8954cd9d9f73d009b3333aa80c24d1d6b0837 /Lib/test/string_tests.py | |
parent | 0f8b494df68a949ede01fbe124c29e0510e83933 (diff) | |
download | cpython-1a7b3eee946183c75eddecafe76c60e87c6f5e7d.zip cpython-1a7b3eee946183c75eddecafe76c60e87c6f5e7d.tar.gz cpython-1a7b3eee946183c75eddecafe76c60e87c6f5e7d.tar.bz2 |
SF bug #422088: [OSF1 alpha] string.replace().
Platform blew up on "123".replace("123", ""). Michael Hudson pinned the
blame on platform malloc(0) returning NULL.
This is a candidate for all bugfix releases.
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r-- | Lib/test/string_tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index a408ef3..fcce50f 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -177,6 +177,12 @@ def run_method_tests(test): test('replace', 'one!two!three!', 'one@two@three@', '!', '@') test('replace', 'one!two!three!', 'one!two!three!', 'x', '@') test('replace', 'one!two!three!', 'one!two!three!', 'x', '@', 2) + # Next three for SF bug 422088: [OSF1 alpha] string.replace(); died with + # MemoryError due to empty result (platform malloc issue when requesting + # 0 bytes). + test('replace', '123', '', '123', '') + test('replace', '123123', '', '123', '') + test('replace', '123x123', 'x', '123', '') test('startswith', 'hello', 1, 'he') test('startswith', 'hello', 1, 'hello') |