summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_textwrap.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2008-12-13 23:20:54 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2008-12-13 23:20:54 (GMT)
commit7c59bc6f2faefbf8c4ef4692fee1f658aa53c6a6 (patch)
tree192915cee35e899422ec26ad83e34d35c198ae5b /Lib/test/test_textwrap.py
parentd9c03e0da300bc52d5503fd18a95f897d92bf454 (diff)
downloadcpython-7c59bc6f2faefbf8c4ef4692fee1f658aa53c6a6.zip
cpython-7c59bc6f2faefbf8c4ef4692fee1f658aa53c6a6.tar.gz
cpython-7c59bc6f2faefbf8c4ef4692fee1f658aa53c6a6.tar.bz2
Issue #4163: textwrap module: allow word splitting on a hyphen preceded by a non-ASCII letter.
Diffstat (limited to 'Lib/test/test_textwrap.py')
-rw-r--r--Lib/test/test_textwrap.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_textwrap.py b/Lib/test/test_textwrap.py
index 1cbd9ce..ffd59c3 100644
--- a/Lib/test/test_textwrap.py
+++ b/Lib/test/test_textwrap.py
@@ -365,6 +365,14 @@ What a mess!
self.assertRaises(ValueError, wrap, text, 0)
self.assertRaises(ValueError, wrap, text, -1)
+ def test_no_split_at_umlaut(self):
+ text = "Die Empf\xe4nger-Auswahl"
+ self.check_wrap(text, 13, ["Die", "Empf\xe4nger-", "Auswahl"])
+
+ def test_umlaut_followed_by_dash(self):
+ text = "aa \xe4\xe4-\xe4\xe4"
+ self.check_wrap(text, 7, ["aa \xe4\xe4-", "\xe4\xe4"])
+
class LongWordTestCase (BaseTestCase):
def setUp(self):