[Zope-Checkins] CVS: Zope/lib/python/StructuredText/tests - testStructuredText.py:1.20

Andreas Jung andreas@andreas-jung.com
Sun, 25 May 2003 16:00:39 -0400


Update of /cvs-repository/Zope/lib/python/StructuredText/tests
In directory cvs.zope.org:/tmp/cvs-serv5259/lib/python/StructuredText/tests

Modified Files:
	testStructuredText.py 
Log Message:
     - Included STX i18n patch by Andrey Lebedev to provide compatibility
       with utf-8 encoded strings.


=== Zope/lib/python/StructuredText/tests/testStructuredText.py 1.19 => 1.20 ===
--- Zope/lib/python/StructuredText/tests/testStructuredText.py:1.19	Wed Sep 18 11:12:48 2002
+++ Zope/lib/python/StructuredText/tests/testStructuredText.py	Sun May 25 16:00:38 2003
@@ -210,13 +210,17 @@
         '<code>"literal":http://www.zope.org/.</code>')
 
 
-    def XXXtestUnicodeContent(self):
-        # This fails because ST uses the default locale to get "letters"
-        # whereas it should use \w+ and re.U if the string is Unicode.
-        #self._test(u"h\xe9 **y\xe9** xx",
-        #           u"h\xe9 <strong>y\xe9</strong> xx")
-        pass
-
+    def testUnicodeContent(self):
+        self._test(u"h\xe9 **y\xe9** xx",
+                   u"h\xe9 <strong>y\xe9</strong> xx")
+        self._test(u"h\xe9 *y\xe9* xx",
+                   u"h\xe9 <em>y\xe9</em> xx")
+        self._test(u"h\xe9 _y\xe9_ xx",
+                   u"h\xe9 <u>y\xe9</u> xx")
+        self._test(u"h\xe9 'y\xe9' xx",
+                   u"h\xe9 <code>y\xe9</code> xx")
+        self._test(u"h\xe9 \"y\xe9\":http://zope.org xx",
+                   u"h\xe9 <a href=\"http://zope.org\">y\xe9</a> xx")
 
 def test_suite():
     suite = unittest.TestSuite()