12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- require './t/test.pl';
- package OddMuse;
- use Test::More tests => 22;
- use utf8;
- add_module('fix-encoding.pl');
- test_page_negative(get_page('action=admin'), 'action=fix-encoding');
- test_page_negative(get_page('action=admin id=foo'),
- 'action=fix-encoding;id=foo',
- 'action=fix-escaping;id=foo');
- test_page(get_page('action=fix-encoding id=Example'),
- 'Location: http://localhost/wiki.pl/Example');
- test_page(get_page('action=fix-escaping id=Example'),
- 'Location: http://localhost/wiki.pl/Example');
- test_page_negative(get_page('action=rc all=1 showedit=1'), 'fix');
- test_page(update_page('Example', 'Pilgerstätte für die Göttin'),
- 'Pilgerstätte für die Göttin');
- test_page(get_page('action=fix-encoding id=Example'),
- 'Location: http://localhost/wiki.pl/Example');
- test_page(get_page('action=fix-escaping id=Example'),
- 'Location: http://localhost/wiki.pl/Example');
- test_page_negative(get_page('action=rc all=1 showedit=1'),
- 'Fix Character encoding');
- test_page_negative(get_page('action=admin id=Example'),
- 'action=fix-encoding;id=Example',
- 'action=fix-escaping;id=Example');
- test_page(get_page('action=admin id=Example username=Alex'),
- 'action=fix-encoding;id=Example',
- 'action=fix-escaping;id=Example');
- test_page(update_page('Example', 'Pilgerstätte für die Göttin',
- 'borked encoding'),
- 'Pilgerstätte für die Göttin');
- test_page(get_page('action=fix-encoding id=Example'),
- 'Location: http://localhost/wiki.pl/Example');
- test_page(get_page('Example'),
- 'Pilgerstätte für die Göttin');
- test_page(get_page('action=rc showedit=1'),
- 'Fix character encoding');
- test_page(update_page('Example', '<b>bold</b>',
- 'borked escaping'),
- '<b>bold</b>');
- test_page(get_page('action=fix-escaping id=Example'),
- 'Location: http://localhost/wiki.pl/Example');
- test_page(get_page('Example'),
- '<b>bold</b>');
- test_page(get_page('action=rc showedit=1'),
- 'Fix HTML escapes');
|