annotate MoinMoin/script/migration/_tests/test_conv160a_wiki.py @ 6103:500f68d3e2fd

remove our own usage of python_compatibility module
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 06 Sep 2016 01:00:25 +0200
parents 3be35ace8aca
children
rev   line source
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
1 # -*- coding: iso-8859-1 -*-
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
2 """
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
3 MoinMoin - tests of wiki content conversion
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
4
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
5 TODO:
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
6 * fix parser/converter anchor link handling
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
7 * emit a warning if we find some page name that was renamed as a macro argument?
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
8 * shall we support camelcase renaming?
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
9
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
10 Limitations of this converter:
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
11 * converter does not touch "pre sections", thus markup examples in {{{ }}}
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
12 or ` ` will have to get handled manually.
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
13 * converter does not touch macro arguments, they will have to get handled
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
14 manually
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
15 * converter does not touch CamelCase links (but there should be no need to do)
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
16
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
17 @copyright: 2007 MoinMoin:ThomasWaldmann
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
18 @license: GNU GPL, see COPYING for details.
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
19 """
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
20 import py
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
21 #py.test.skip("broken")
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
22
4950
3be35ace8aca test_conv160*: overwriting of i18n.wikiLanguages reverted for tests
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 4630
diff changeset
23 from MoinMoin import i18n
3be35ace8aca test_conv160*: overwriting of i18n.wikiLanguages reverted for tests
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 4630
diff changeset
24 i18n_wikiLanguages = i18n.wikiLanguages
3be35ace8aca test_conv160*: overwriting of i18n.wikiLanguages reverted for tests
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 4630
diff changeset
25 # convert_wiki overwrites i18n.wikiLanguages, we revert this change for following tests
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
26 from MoinMoin.script.migration._conv160a_wiki import convert_wiki
4950
3be35ace8aca test_conv160*: overwriting of i18n.wikiLanguages reverted for tests
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 4630
diff changeset
27 i18n.wikiLanguages = i18n_wikiLanguages
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
28
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
29 class TestWikiConversion:
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
30 """ test the wiki markup conversion 1.6.0a -> 1.6.0 """
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
31 def test_absolute(self):
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
32 request = self.request
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
33 pagename = 'TestPage'
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
34 rename_some_page = {
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
35 ('PAGE', 'some_page'): 'some page',
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
36 }
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
37 rename_some_file = {
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
38 ('FILE', pagename, 'with_underscore'): 'without underscore',
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
39 ('FILE', pagename, 'with blank'): 'without_blank',
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
40 }
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
41
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
42 tests = [
4488
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
43 # attachment links
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
44 ("attachment:filename.ext", {}, "[[attachment:filename.ext]]"),
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
45 ("[attachment:'Filename.ext' Aliasname]", {}, "[[attachment:Filename.ext|Aliasname]]"),
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
46 ("[attachment:'Pagename/Filename.ext' Aliasname]", {}, "[[attachment:Pagename/Filename.ext|Aliasname]]"),
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
47 ("[attachment:'Pagename/Subpage/Filename.ext' Aliasname]", {}, "[[attachment:Pagename/Subpage/Filename.ext|Aliasname]]"),
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
48 ('[attachment:"Pagename/Subpage/File Name.ext" Aliasname]', {}, "[[attachment:Pagename/Subpage/File Name.ext|Aliasname]]"),
4490
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
49 ('[inline:text.txt]', {}, '{{attachment:text.txt}}'), # inline is now implied by {{...}}
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
50 ('[inline:image.jpg]', {}, '{{attachment:image.jpg}}'), # inline is now implied by {{...}}
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
51 ('[drawing:image]', {}, '{{drawing:image}}'),
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
52 ('[inline:text.txt foo]', {}, '{{attachment:text.txt|foo}}'), # inline is now implied by {{...}}
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
53 ('[inline:image.jpg foo]', {}, '{{attachment:image.jpg|foo}}'), # inline is now implied by {{...}}
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
54 ('[drawing:image foo]', {}, '{{drawing:image|foo}}'),
4489
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
55
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
56 # "nothing changed" checks (except markup)
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
57 ('', {}, ''),
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
58 ('CamelCase', {}, 'CamelCase'),
4488
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
59 ('["/Subpage"]', {}, "[[/Subpage]]"),
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
60 ('["Pagename/Subpage"]', {}, "[[Pagename/Subpage]]"),
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
61 ("['Pagename/Subpage' Aliasname]", {}, "[[Pagename/Subpage|Aliasname]]"),
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
62 ('["some page" somepage]', {}, '[[some page|somepage]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
63 ("['some page' somepage]", {}, '[[some page|somepage]]'),
4489
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
64
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
65 ('Doesnotexist:CamelCase', {}, 'Doesnotexist:CamelCase'),
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
66 ('MoinMaster:CamelCase', {}, 'MoinMaster:CamelCase'),
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
67 ("MoinMaster:'some page'", {}, '[[MoinMaster:some page]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
68 ('MoinMaster:"some page"', {}, '[[MoinMaster:some page]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
69
4489
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
70 ('[wiki:MoinMoin/FrontPage]', {}, 'MoinMoin:FrontPage'),
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
71 ('some_text', {}, 'some_text'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
72 ('["some_text"]', {}, '[[some_text]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
73 ('some_page', rename_some_page, 'some_page'), # not a link
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
74 ('{{{["some_page"]}}}', rename_some_page, '{{{["some_page"]}}}'), # not a link
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
75 ('`["some_page"]`', rename_some_page, '`["some_page"]`'), # not a link
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
76 ('["OtherPage/some_page"]', rename_some_page, '[[OtherPage/some_page]]'), # different link
4489
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
77 ('MoinMaster:some_page', rename_some_page, 'MoinMaster:some_page'), # external link
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
78 ('http://some_server/some_page', rename_some_page, 'http://some_server/some_page'), # external link
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
79 ('[http://some_server/some_page]', rename_some_page, '[[http://some_server/some_page]]'), # external link
4489
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
80 ('[http://some_server/some_page foo]', rename_some_page, '[[http://some_server/some_page|foo]]'), # external link
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
81 ('[#some_page]', rename_some_page, '[[#some_page]]'), # link to anchor that has same name
4488
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
82 ('[attachment:some_page.png]', rename_some_page, '[[attachment:some_page.png]]'), # att, not page
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
83 ('[attachment:some_page.png test picture]', rename_some_page, '[[attachment:some_page.png|test picture]]'), # att, not page
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
84
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
85 # page rename changes result
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
86 ('["some_page"]', rename_some_page, '[[some page]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
87 ('[:some_page]', rename_some_page, '[[some page]]'),
4488
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
88 ('[:some_page#anchor]', rename_some_page, '[[some page#anchor]]'),
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
89 ('[:some_page:]', rename_some_page, '[[some page]]'),
4488
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
90 ('[:some_page#anchor:]', rename_some_page, '[[some page#anchor]]'),
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
91 ('[:some_page:some text]', rename_some_page, '[[some page|some text]]'),
4488
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
92 ('[:some_page#anchor:some text]', rename_some_page, '[[some page#anchor|some text]]'),
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
93 ('Self:some_page', rename_some_page, '[[some page]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
94 ('wiki:Self:some_page', rename_some_page, '[[some page]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
95 ('[wiki:Self:some_page some text]', rename_some_page, '[[some page|some text]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
96 ('wiki:Self:some_page#some_anchor', rename_some_page, '[[some page#some_anchor]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
97
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
98 # other markup changes we do
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
99 ('[:other page]', {}, '[[other page]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
100 ('[:other page:]', {}, '[[other page]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
101 ('[:other page:other text]', {}, '[[other page|other text]]'),
4489
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
102 ('Self:CamelCase', {}, 'CamelCase'),
a835ada897e0 1.6.0a mig script/converter: fix interwiki tests, cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4488
diff changeset
103 ('[wiki:WikiPedia:Lynx_%28web_browser%29 Lynx]', {}, '[[WikiPedia:Lynx_(web_browser)|Lynx]]'),
4488
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
104 ('[:Something:Something]', {}, '[[Something]]'), # optimize markup
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
105
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
106 # "nothing changed" checks
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
107 ('attachment:OtherPage/with_underscore', rename_some_file, '[[attachment:OtherPage/with_underscore]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
108
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
109 # file rename changes result
4488
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
110 ('attachment:with_underscore', rename_some_file, '[[attachment:without underscore]]'),
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
111 ('attachment:TestPage/with_underscore', rename_some_file, '[[attachment:without underscore]]'), # remove superfluous pagename
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
112
4488
a2a05ae3e7ec 1.6.0a mig script/converter: add tests, improve test compliance, clean up
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3925
diff changeset
113 # embed images, all verified on 160a
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
114 ('http://server/image.png', {}, '{{http://server/image.png}}'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
115 ('attachment:image.gif', {}, '{{attachment:image.gif}}'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
116 ('inline:image.jpg', {}, '{{attachment:image.jpg}}'), # inline is now implied by {{...}}
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
117 ('drawing:image', {}, '{{drawing:image}}'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
118
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
119 # macros
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
120 ('[[BR]]', {}, '<<BR>>'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
121 ('[[FullSearch(wtf)]]', {}, '<<FullSearch(wtf)>>'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
122 (u'[[ImageLink(töst.png)]]', {}, u'[[attachment:töst.png|{{attachment:töst.png}}]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
123 ('[[ImageLink(test.png,OtherPage)]]', {}, '[[OtherPage|{{attachment:test.png}}]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
124 ('[[ImageLink(test.png,OtherPage,width=123,height=456)]]', {}, '[[OtherPage|{{attachment:test.png||width=123, height=456}}]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
125 ('[[ImageLink(test.png,OtherPage,width=123,height=456,alt=alttext)]]', {}, '[[OtherPage|{{attachment:test.png|alttext|width=123, height=456}}]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
126 ('[[ImageLink(test.png,OtherPage,width=123,height=456,alt=alt text with blanks)]]', {}, '[[OtherPage|{{attachment:test.png|alt text with blanks|width=123, height=456}}]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
127 ('[[ImageLink(http://server/test.png,OtherPage,width=123,height=456)]]', {}, '[[OtherPage|{{http://server/test.png||width=123, height=456}}]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
128 ('[[ImageLink(http://server/test.png,http://server/,width=123)]]', {}, '[[http://server/|{{http://server/test.png||width=123}}]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
129 ('[[ImageLink(test.png,attachment:test.png)]]', {}, '[[attachment:test.png|{{attachment:test.png}}]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
130 ('[[ImageLink(test.png,inline:test.py)]]', {}, '[[attachment:test.py|{{attachment:test.png}}]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
131
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
132 ]
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
133 for data, renames, expected in tests:
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
134 assert convert_wiki(request, pagename, data, renames) == expected
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
135
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
136 def test_sisterpage(self):
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
137 request = self.request
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
138 top_page = 'toppage'
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
139 pagename = '%s/subpage' % top_page
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
140 rename_some_page = {
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
141 ('PAGE', '%s/sister' % top_page): '%s/renamed_sister' % top_page,
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
142 }
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
143 tests = [
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
144 # "nothing changed" checks
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
145 ('["../sister_norename"]', rename_some_page, '[[../sister_norename]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
146
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
147 # renames
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
148 ('["../sister"]', rename_some_page, '[[../renamed_sister]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
149 ]
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
150 for data, renames, expected in tests:
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
151 assert convert_wiki(request, pagename, data, renames) == expected
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
152
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
153 def test_subpage(self):
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
154 request = self.request
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
155 pagename = 'toppage'
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
156 rename_some_page = {
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
157 ('PAGE', '%s/subpage' % pagename): '%s/renamed_subpage' % pagename,
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
158 }
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
159 tests = [
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
160 # "nothing changed" checks
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
161 ('["/subpage_norename"]', rename_some_page, '[[/subpage_norename]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
162
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
163 # renames
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
164 ('["/subpage"]', rename_some_page, '[[/renamed_subpage]]'),
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
165 ]
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
166 for data, renames, expected in tests:
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
167 assert convert_wiki(request, pagename, data, renames) == expected
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
168
4490
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
169 def test_full_page(self):
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
170 #py.test.skip("not wanted right now")
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
171 markup_160a = u"""\
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
172 = CamelCase =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
173 == Pages ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
174 1. SomePage
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
175 2. TestPage (does not link to current page)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
176 3. SomePage/SubPage
3925
44d856f8a110 add migration support to migrate from early 1.6.0alpha to 1.6.0 release
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
diff changeset
177
4490
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
178 ## not supported on 160a
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
179 ##== Pages with anchor ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
180 ## 1. SomePage#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
181 ## 2. TestPage#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
182 ## 3. SomePage/SubPage#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
183
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
184 = Interwiki =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
185 == Pages ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
186 1. Self:SomePage
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
187 2. Self:some_page
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
188 3. Self:'some page'
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
189 4. Self:"some page"
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
190 5. MoinMoin:SomePage
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
191 6. MoinMoin:some_page
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
192 7. MoinMoin:'some page'
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
193 8. MoinMoin:"some page"
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
194
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
195 == Pages with anchor ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
196 1. Self:SomePage#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
197 2. Self:some_page#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
198 3. Self:'some page#anchor'
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
199 4. Self:"some page#anchor"
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
200 5. MoinMoin:SomePage#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
201 6. MoinMoin:some_page#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
202 7. MoinMoin:'some page#anchor'
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
203 8. MoinMoin:"some page#anchor"
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
204
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
205 == Invalid wiki name ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
206 1. Doesnotexist:CamelCase (shall not link)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
207 2. Foo:bar (shall not link)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
208
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
209 = URL =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
210 == simple ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
211 1. http://moinmo.in/MoinMoin
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
212 2. http://static.moinmo.in/logos/moinmoin.png (renders image in 160a)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
213 3. mailto:someone@example.org
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
214 4. wiki:Self:some_page
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
215
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
216 == with anchor ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
217 1. http://moinmo.in/MoinMoin#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
218 2. wiki:Self:some_page#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
219
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
220 = bracketed link =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
221 == Page ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
222 1. ["some page"]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
223 2. ["some page" somepage]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
224 3. ['some page' somepage]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
225 4. ["/Subpage"]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
226 5. ["SomePage/Subpage"]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
227 6. ['SomePage/Subpage' Some Page]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
228
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
229 == Page with anchor ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
230 1. ["some page#anchor"]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
231 2. ["some page#anchor" somepage]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
232 3. ['some page#anchor' somepage]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
233 4. ["/Subpage#anchor"]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
234 5. ["SomePage/Subpage#anchor"]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
235 6. ['SomePage/Subpage#anchor' Some Page]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
236
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
237 == Anchor on current page ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
238 1. [#anchor]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
239 ## 1. [TestPage#anchor] not supported on 160a
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
240
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
241 == URL ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
242 1. [http://some_server/some_page]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
243 2. [http://some_server/some_page some page]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
244 3. [wiki:MoinMoin/FrontPage]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
245 4. [wiki:Self:some_page some page]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
246 5. [wiki:WikiPedia:Lynx_(web_browser) Lynx]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
247 6. [:some_page]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
248 7. [:some_page:]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
249 8. [:some_page:some page]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
250 9. [:Something:Something]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
251
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
252 == URL with anchor ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
253 1. [http://some_server/some_page#anchor]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
254 2. [http://some_server/some_page#anchor some page]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
255 3. [wiki:MoinMoin/FrontPage#anchor]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
256 4. [wiki:Self:some_page#anchor some page]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
257 5. [wiki:WikiPedia:Lynx_(web_browser)#anchor Lynx]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
258 6. [:some_page#anchor]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
259 7. [:some_page#anchor:]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
260 8. [:some_page#anchor:some page]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
261 9. [:Something#anchor:Something]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
262
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
263 = preformatted =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
264 1. {{{["some_page"]}}} (converter shall not change pre content)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
265 2. `["some_page"]` (converter shall not change pre content)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
266
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
267 = Attachments, Drawings, Images =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
268 == simple ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
269 1. attachment:text.txt is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
270 2. inline:text.txt is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
271 3. attachment:image.png is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
272 4. inline:image.png is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
273 5. drawing:image is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
274
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
275 == bracketed ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
276 1. [attachment:text.txt] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
277 2. [inline:text.txt] is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
278 3. [attachment:image.png] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
279 4. [drawing:image] is embedding png image
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
280 5. [inline:image.png] is showing binary content as text in 160a (wrong)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
281
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
282 == bracketed with label ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
283 1. [attachment:text.txt some label] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
284 2. [inline:text.txt some label] is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
285 3. [attachment:image.png some label] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
286 4. [drawing:image some label] is embedding png image
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
287 5. [inline:image.png some label] is showing binary content as text in 160a (wrong)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
288
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
289 == bracketed, on other page, with label ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
290 1. [attachment:SomePage/text.txt some label] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
291 2. [inline:SomePage/text.txt some label] is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
292 3. [attachment:SomePage/image.png some label] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
293 4. [drawing:SomePage/image some label] is embedding png image
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
294 5. [inline:SomePage/image.png some label] is showing binary content as text in 160a (wrong)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
295
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
296 """
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
297 expected_markup_160 = u"""\
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
298 = CamelCase =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
299 == Pages ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
300 1. SomePage
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
301 2. TestPage (does not link to current page)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
302 3. [[SomePage/SubPage]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
303
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
304 ## not supported on 160a
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
305 ##== Pages with anchor ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
306 ## 1. SomePage#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
307 ## 2. TestPage#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
308 ## 3. SomePage/SubPage#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
309
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
310 = Interwiki =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
311 == Pages ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
312 1. SomePage
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
313 2. [[some_page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
314 3. [[some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
315 4. [[some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
316 5. MoinMoin:SomePage
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
317 6. MoinMoin:some_page
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
318 7. [[MoinMoin:some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
319 8. [[MoinMoin:some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
320
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
321 == Pages with anchor ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
322 1. [[SomePage#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
323 2. [[some_page#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
324 3. [[some page#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
325 4. [[some page#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
326 5. MoinMoin:SomePage#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
327 6. MoinMoin:some_page#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
328 7. [[MoinMoin:some page#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
329 8. [[MoinMoin:some page#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
330
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
331 == Invalid wiki name ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
332 1. Doesnotexist:CamelCase (shall not link)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
333 2. Foo:bar (shall not link)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
334
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
335 = URL =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
336 == simple ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
337 1. http://moinmo.in/MoinMoin
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
338 2. {{http://static.moinmo.in/logos/moinmoin.png}} (renders image in 160a)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
339 3. mailto:someone@example.org
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
340 4. [[some_page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
341
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
342 == with anchor ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
343 1. http://moinmo.in/MoinMoin#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
344 2. [[some_page#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
345
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
346 = bracketed link =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
347 == Page ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
348 1. [[some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
349 2. [[some page|somepage]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
350 3. [[some page|somepage]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
351 4. [[/Subpage]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
352 5. [[SomePage/Subpage]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
353 6. [[SomePage/Subpage|Some Page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
354
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
355 == Page with anchor ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
356 1. [[some page#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
357 2. [[some page#anchor|somepage]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
358 3. [[some page#anchor|somepage]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
359 4. [[/Subpage#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
360 5. [[SomePage/Subpage#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
361 6. [[SomePage/Subpage#anchor|Some Page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
362
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
363 == Anchor on current page ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
364 1. [[#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
365 ## 1. [TestPage#anchor] not supported on 160a
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
366
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
367 == URL ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
368 1. [[http://some_server/some_page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
369 2. [[http://some_server/some_page|some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
370 3. MoinMoin:FrontPage
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
371 4. [[some_page|some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
372 5. [[WikiPedia:Lynx_(web_browser)|Lynx]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
373 6. [[some_page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
374 7. [[some_page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
375 8. [[some_page|some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
376 9. [[Something]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
377
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
378 == URL with anchor ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
379 1. [[http://some_server/some_page#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
380 2. [[http://some_server/some_page#anchor|some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
381 3. MoinMoin:FrontPage#anchor
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
382 4. [[some_page#anchor|some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
383 5. [[WikiPedia:Lynx_(web_browser)#anchor|Lynx]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
384 6. [[some_page#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
385 7. [[some_page#anchor]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
386 8. [[some_page#anchor|some page]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
387 9. [[Something#anchor|Something]]
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
388
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
389 = preformatted =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
390 1. {{{["some_page"]}}} (converter shall not change pre content)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
391 2. `["some_page"]` (converter shall not change pre content)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
392
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
393 = Attachments, Drawings, Images =
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
394 == simple ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
395 1. [[attachment:text.txt]] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
396 2. {{attachment:text.txt}} is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
397 3. {{attachment:image.png}} is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
398 4. {{attachment:image.png}} is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
399 5. {{drawing:image}} is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
400
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
401 == bracketed ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
402 1. [[attachment:text.txt]] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
403 2. {{attachment:text.txt}} is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
404 3. [[attachment:image.png]] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
405 4. {{drawing:image}} is embedding png image
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
406 5. {{attachment:image.png}} is showing binary content as text in 160a (wrong)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
407
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
408 == bracketed with label ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
409 1. [[attachment:text.txt|some label]] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
410 2. {{attachment:text.txt|some label}} is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
411 3. [[attachment:image.png|some label]] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
412 4. {{drawing:image|some label}} is embedding png image
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
413 5. {{attachment:image.png|some label}} is showing binary content as text in 160a (wrong)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
414
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
415 == bracketed, on other page, with label ==
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
416 1. [[attachment:SomePage/text.txt|some label]] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
417 2. {{attachment:SomePage/text.txt|some label}} is embedding
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
418 3. [[attachment:SomePage/image.png|some label]] is linking
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
419 4. {{drawing:SomePage/image|some label}} is embedding png image
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
420 5. {{attachment:SomePage/image.png|some label}} is showing binary content as text in 160a (wrong)
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
421
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
422 """
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
423 markup_160 = convert_wiki(self.request, u'TestPage', markup_160a, {})
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
424 #print markup_160a ; print "---" ; print markup_160
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
425 markup_160 = markup_160.replace('\r\n', '\n')
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
426 assert markup_160 == expected_markup_160
b120d9978144 1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4489
diff changeset
427
4630
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
428 def test_parser(self):
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
429 markup_160a = u"""\
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
430 {{{#!html
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
431 ...
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
432 }}}
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
433
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
434 """
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
435 expected_markup_160 = u"""\
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
436 {{{#!html
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
437 ...
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
438 }}}
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
439
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
440 """
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
441 markup_160 = convert_wiki(self.request, u'TestPage', markup_160a, {})
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
442 #print markup_160a ; print "---" ; print markup_160
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
443 markup_160 = markup_160.replace('\r\n', '\n')
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
444 assert markup_160 == expected_markup_160
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
445
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
446 def test_pre(self):
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
447 markup_160a = u"""\
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
448 {{{
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
449 ...
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
450 }}}
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
451
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
452 """
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
453 expected_markup_160 = u"""\
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
454 {{{
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
455 ...
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
456 }}}
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
457
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
458 """
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
459 markup_160 = convert_wiki(self.request, u'TestPage', markup_160a, {})
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
460 #print markup_160a ; print "---" ; print markup_160
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
461 markup_160 = markup_160.replace('\r\n', '\n')
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
462 assert markup_160 == expected_markup_160
b0319cfcb1bc 1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4490
diff changeset
463