diff MoinMoin/script/migration/_tests/test_conv160a_wiki.py @ 4630:b0319cfcb1bc

1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 18 Feb 2009 06:53:55 +0100
parents b120d9978144
children 3be35ace8aca
line wrap: on
line diff
--- a/MoinMoin/script/migration/_tests/test_conv160a_wiki.py	Sat Feb 14 22:21:34 2009 +0100
+++ b/MoinMoin/script/migration/_tests/test_conv160a_wiki.py	Wed Feb 18 06:53:55 2009 +0100
@@ -421,3 +421,39 @@
         markup_160 = markup_160.replace('\r\n', '\n')
         assert markup_160 == expected_markup_160
 
+    def test_parser(self):
+        markup_160a = u"""\
+{{{#!html
+...
+}}}
+
+"""
+        expected_markup_160 = u"""\
+{{{#!html
+...
+}}}
+
+"""
+        markup_160 = convert_wiki(self.request, u'TestPage', markup_160a, {})
+        #print markup_160a ; print "---" ; print markup_160
+        markup_160 = markup_160.replace('\r\n', '\n')
+        assert markup_160 == expected_markup_160
+
+    def test_pre(self):
+        markup_160a = u"""\
+{{{
+...
+}}}
+
+"""
+        expected_markup_160 = u"""\
+{{{
+...
+}}}
+
+"""
+        markup_160 = convert_wiki(self.request, u'TestPage', markup_160a, {})
+        #print markup_160a ; print "---" ; print markup_160
+        markup_160 = markup_160.replace('\r\n', '\n')
+        assert markup_160 == expected_markup_160
+