changeset 3217:b06c048233f2

add a new (failing) test, do not skip a (now) working test, fix small trailing whitespace issue
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 09 Mar 2008 00:02:17 +0100
parents 5baf4f41dc4c
children 8bfa8788da3d
files MoinMoin/parser/_tests/test_text_moin_wiki.py MoinMoin/request/request_wsgi.py
diffstat 2 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/_tests/test_text_moin_wiki.py	Fri Mar 07 19:15:49 2008 +0100
+++ b/MoinMoin/parser/_tests/test_text_moin_wiki.py	Sun Mar 09 00:02:17 2008 +0100
@@ -80,6 +80,14 @@
             result = self.parse(text)
             assert re.search(r'<p.*?>\s*Paragraph\s*', result)
 
+    def testStrangeP(self):
+        """ parser.wiki: empty line separates paragraphs """
+        result = self.parse("""<<BR>> <<BR>>
+
+foo ''bar'' baz.
+""")
+        assert re.search(r'foo <em>bar</em> baz', result)
+
 
 class TestHeadings(ParserTestCase):
     """ Test various heading problems """
@@ -229,12 +237,12 @@
         py.test.skip("Broken")
         cases = (
             # test, expected
-            ("text'''text\n", r"<p>text<strong>text\s*</strong></p>"),
-            ("text''text\n", r"<p>text<em>text\s*</em></p>"),
-            ("text__text\n", r"<p>text<span class=\"u\">text\s*</span></p>"),
+            ("text__text\n", r'<p[^>]*>text<span class="u">text\s*</span></p>'),
+            ("text''text\n", r'<p[^>]*>text<em>text\s*</em></p>'),
+            ("text'''text\n", r'<p[^>]*>text<strong>text\s*</strong></p>'),
             ("text ''em '''em strong __em strong underline",
-             r"text <em>em <strong>em strong <span class=\"u\">em strong underline"
-             r"\s*</span></strong></em></p>"),
+             r'text <em>em <strong>em strong <span class="u">em strong underline'
+             r'\s*</span></strong></em></p>'),
             )
         for test, expected in cases:
             result = self.parse(test)
@@ -486,8 +494,6 @@
     def testManyNestingPreBrackets(self):
         """ tests two nestings  ({{{ }}} and {{{ }}}) in one line for the wiki parser
         """
-        py.test.skip("Broken")
-
         raw = """{{{{
 Test {{{brackets}}} and test {{{brackets}}}
 }}}}"""
--- a/MoinMoin/request/request_wsgi.py	Fri Mar 07 19:15:49 2008 +0100
+++ b/MoinMoin/request/request_wsgi.py	Sun Mar 09 00:02:17 2008 +0100
@@ -34,7 +34,7 @@
         """ Override to create cgi form """
         form = cgi.FieldStorage(fp=self.stdin, environ=self.env, keep_blank_values=1)
         return RequestBase._setup_args_from_cgi_form(self, form)
-    
+
     def read(self, n=None):
         if n is None:
             return self.stdin.read()