Test an em-dash with adjacent punctuation.
authorGreg Ward <gward@python.net>
Thu, 22 Aug 2002 21:27:05 +0000 (21:27 +0000)
committerGreg Ward <gward@python.net>
Thu, 22 Aug 2002 21:27:05 +0000 (21:27 +0000)
Lib/test/test_textwrap.py

index 36df52a1a3d24de91556fa58f79b7ee9e23a8673..fc5d0cc20244736f574d47ae9d5fe5baa1d07bd8 100644 (file)
@@ -166,6 +166,12 @@ What a mess!
                   "and", " ", "another!"]
         self.check_split(self.wrapper, text, expect)
 
+        text = "and then--bam!--he was gone"
+        expect = ["and", " ", "then", "--", "bam!", "--",
+                  "he", " ", "was", " ", "gone"]
+        self.check_split(self.wrapper, text, expect)
+
+
     def test_unix_options (self):
         # Test that Unix-style command-line options are wrapped correctly.
         # Both Optik (OptionParser) and Docutils rely on this behaviour!