diff MoinMoin/_tests/test_wikiutil.py @ 2771:1134a5cc12c2

gui converter fixes for new markup, fix/extend tests, remove unused code
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 26 Aug 2007 16:07:21 +0200
parents 4c95862bf9ef
children 2bbf611f4f2c
line wrap: on
line diff
--- a/MoinMoin/_tests/test_wikiutil.py	Sun Aug 26 14:14:54 2007 +0200
+++ b/MoinMoin/_tests/test_wikiutil.py	Sun Aug 26 16:07:21 2007 +0200
@@ -712,6 +712,21 @@
         encoded = wikiutil.anchor_name_from_text(text)
         assert expected == encoded
 
+class TestPageLinkMarkup:
+    def test_pagelinkmarkup(self):
+        tests = [
+            # pagename, expected markup
+            ('SomePage', 'SomePage'),
+            ('Somepage', '[[Somepage]]'),
+            ('somepage', '[[somepage]]'),
+            ('Some Page', '[[Some Page]]'),
+        ]
+        for pagename, expected in tests:
+            yield self._check, pagename, expected
+
+    def _check(self, pagename, expected):
+        assert expected == wikiutil.pagelinkmarkup(pagename)
+
 class TestRelativeTools:
     tests = [
         # test                      expected output