Mercurial > moin > 1.9
changeset 2739:9fd4a16a08cc
tests: some more wiki parser link markup tests
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Tue, 21 Aug 2007 13:32:39 +0200 |
parents | 79a147284dde |
children | 63ae36c70930 |
files | MoinMoin/parser/_tests/test_text_moin_wiki.py |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/parser/_tests/test_text_moin_wiki.py Tue Aug 21 13:10:34 2007 +0200 +++ b/MoinMoin/parser/_tests/test_text_moin_wiki.py Tue Aug 21 13:32:39 2007 +0200 @@ -532,11 +532,14 @@ text = 'AAA %s AAA' needle = re.compile(text % r'(.+)') _tests = ( - # test, expected - ('[[something]]', '<a class="nonexistent" href="./something">something</a>'), - ('MoinMoin:something', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/something" title="MoinMoin">something</a>'), - ('[[MoinMoin:with space]]', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/with%20space" title="MoinMoin">with space</a>'), - ('[[RFC:1 2 3]]', '<a class="interwiki" href="http://www.ietf.org/rfc/rfc1%202%203" title="RFC">1 2 3</a>'), + # test, expected + ('[[something]]', '<a class="nonexistent" href="./something">something</a>'), + ('[[something|some text]]', '<a class="nonexistent" href="./something">some text</a>'), + ('MoinMoin:something', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/something" title="MoinMoin">something</a>'), + ('[[MoinMoin:something|some text]]', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/something" title="MoinMoin">some text</a>'), + ('[[MoinMoin:with space]]', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/with%20space" title="MoinMoin">with space</a>'), + ('[[MoinMoin:with space|some text]]', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/with%20space" title="MoinMoin">some text</a>'), + ('[[http://google.com/|google]]', '<a class="http" href="http://google.com/">google</a>'), ) def testTextFormating(self):