comparison MoinMoin/script/migration/_tests/test_conv160_wiki.py @ 2610:ffe8c2d9a4ba

1.6 converter: only convert current rev of a page, added commented failing test cases
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 06 Aug 2007 01:40:09 +0200
parents 7aac9e2ecb3a
children 7ed38f2af242 82b0e4625f90
comparison
equal deleted inserted replaced
2609:7aac9e2ecb3a 2610:ffe8c2d9a4ba
3 MoinMoin - tests of wiki content conversion 3 MoinMoin - tests of wiki content conversion
4 4
5 TODO: 5 TODO:
6 * add some ../some_page test 6 * add some ../some_page test
7 * add some /some_page test 7 * add some /some_page test
8 * add more quote_triggers
9 * fix parser/converter anchor link handling 8 * fix parser/converter anchor link handling
10 * emit a warning if we find some page name that was renamed as a macro argument? 9 * emit a warning if we find some page name that was renamed as a macro argument?
11 * shall we support camelcase renaming? 10 * shall we support camelcase renaming?
12 11
13 Limitations of this converter: 12 Limitations of this converter:
14 * converter does not touch "pre sections", thus markup examples in {{{ }}} 13 * converter does not touch "pre sections", thus markup examples in {{{ }}}
15 or ` ` will have to get handled manually. 14 or ` ` will have to get handled manually.
16 * converter does not touch macro arguments, they will have to get handled 15 * converter does not touch macro arguments, they will have to get handled
17 manually 16 manually
18
19 Remaining problems:
20
21 [wiki:/RecommendPage]
22 [wiki:/farms farms]
23
24 [wiki:MacroMarket/EmbedObject EO]
25 [wiki:SeaPig/BrianDorsey] ambiguity!!! can be resolved with some interwiki map lookup
26 and transformed to wiki:SeaPig:BrianDorsey if SeaPig is in
27 interwiki map, but no page SeaPig exists.
28
29 [:MeatBall:CleanLinking meatball-wiki: clean linking]
30 [:Infrastructure:Infrastructure] optimize to ["Infrastructure"]
31 [attachment:My%20Attachment.jpg:it works]
32 [wiki:LinuxWiki: LinuxWiki.de]
33 17
34 @copyright: 2007 MoinMoin:ThomasWaldmann 18 @copyright: 2007 MoinMoin:ThomasWaldmann
35 @license: GNU GPL, see COPYING for details. 19 @license: GNU GPL, see COPYING for details.
36 """ 20 """
37 21
49 } 33 }
50 tests = [ 34 tests = [
51 # NEEDED? ('CamelCase', {}, 'CamelCase'), 35 # NEEDED? ('CamelCase', {}, 'CamelCase'),
52 # FAILS ('RenameThis', rename_some_page, 'ThisRenamed'), 36 # FAILS ('RenameThis', rename_some_page, 'ThisRenamed'),
53 # NEEDED? ('!RenameThis', {}, '!RenameThis'), # not a link 37 # NEEDED? ('!RenameThis', {}, '!RenameThis'), # not a link
38
39 # FAILING tests:
40 #('[wiki:/OtherPage]', rename_some_page, '[wiki:/OtherPage]'),
41 #('[wiki:/OtherPage other page]', rename_some_page, '[wiki:/OtherPage other page]'),
42 # ('[:Something:Something]', {}, '["Something"]'),
43 #('[attachment:My%20Attachment.jpg:it works]', {}, '[attachment:"My Attachment.jpg" it works]'),
44 #('[wiki:LinuxWiki: LinuxWiki.de]', {}, '[wiki:LinuxWiki: LinuxWiki.de]'),
45 #('[:MeatBall:CleanLinking meatball-wiki: clean linking]', {}, '[:MeatBall:CleanLinking meatball-wiki: clean linking]'),
46
47 # ambiguity!!! can be resolved with some interwiki map lookup
48 # and transformed to wiki:SeaPig:BrianDorsey if SeaPig is in
49 # interwiki map, but no page SeaPig exists.
50 #('[wiki:MacroMarket/EmbedObject EO]', {}, '["MacroMarket/EmbedObject" EO]'),
51 ('[wiki:SeaPig/BrianDorsey]', {}, '[wiki:SeaPig:BrianDorsey]'),
54 52
55 # "nothing changed" checks 53 # "nothing changed" checks
56 ('', {}, ''), 54 ('', {}, ''),
57 ('MoinMaster:CamelCase', {}, 'MoinMaster:CamelCase'), 55 ('MoinMaster:CamelCase', {}, 'MoinMaster:CamelCase'),
58 ('some_text', {}, 'some_text'), 56 ('some_text', {}, 'some_text'),