diff MoinMoin/_tests/test_wikiutil.py @ 2730:a907a61c33b3

* The 1.5.8 to 1.6.0 converter now uses the 1.5.8 wiki parser, for better (bug) compatibility. * Wiki parser fixes. * Reverted split_wiki/resolve_wiki to 1.5.8 code. The 1.6/1.7 code supported pagename quoting and this is not used any more. Also we need the (broken) 1.5.8 code to have the converter behave as 1.5.8 would do. Added deprecation notes for this old code. * Added new split_interwiki/resolve_interwiki code as replacement. * HTML formatter's attachment_link method got a new kw arg 'text_format' so we can call it with non-text link descriptions (e.g. images), too. * misc. fixes/cleanups
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 19 Aug 2007 19:28:35 +0200
parents 59b3d8b8971f
children 7bfe80df6772
line wrap: on
line diff
--- a/MoinMoin/_tests/test_wikiutil.py	Mon Aug 13 04:06:53 2007 +0200
+++ b/MoinMoin/_tests/test_wikiutil.py	Sun Aug 19 19:28:35 2007 +0200
@@ -68,20 +68,14 @@
 class TestInterWiki:
     def testSplitWiki(self):
-        tests = [('SomePage', ('Self', 'SomePage', '')),
-                 ('OtherWiki:OtherPage', ('OtherWiki', 'OtherPage', '')),
-                 ('MoinMoin:"Page with blanks" link title', ("MoinMoin", "Page with blanks", "link title")),
-                 ('MoinMoin:"Page with blanks"link title', ("MoinMoin", "Page with blanks", "link title")),
-                 ('MoinMoin:"Page with blanks"', ("MoinMoin", "Page with blanks", "")),
-                 ('MoinMoin:"Page with ""quote""" link title', ("MoinMoin", 'Page with "quote"', "link title")),
-                 ('MoinMoin:"Page with """"double-quote"""link title', ("MoinMoin", 'Page with ""double-quote"', "link title")),
-                 ('MoinMoin:"""starts with quote"link title', ("MoinMoin", '"starts with quote', "link title")),
-                 ('MoinMoin:"ends with quote"""link title', ("MoinMoin", 'ends with quote"', "link title")),
-                 ('MoinMoin:"""page with quotes around"""link title', ("MoinMoin", '"page with quotes around"', "link title")),
-                 ('attachment:"filename with blanks.txt" other title', ("attachment", "filename with blanks.txt", "other title")),
+        tests = [('SomePage', ('Self', 'SomePage')),
+                 ('OtherWiki:OtherPage', ('OtherWiki', 'OtherPage')),
+                 (':OtherPage', ('', 'OtherPage')),
+                 # broken ('/OtherPage', ('Self', '/OtherPage')),
+                 # wrong interpretation ('MainPage/OtherPage', ('Self', 'MainPage/OtherPage')),
-        for markup, (wikiname, pagename, linktext) in tests:
-            assert wikiutil.split_wiki(markup) == (wikiname, pagename, linktext)
+        for markup, (wikiname, pagename) in tests:
+            assert wikiutil.split_wiki(markup) == (wikiname, pagename)
     def testJoinWiki(self):
         tests = [(('http://example.org/', u'SomePage'), 'http://example.org/SomePage'),