Index: trunk/extensions/wikihiero/tests.txt |
— | — | @@ -0,0 +1,54 @@ |
| 2 | +!! test |
| 3 | +WikiHiero - basics |
| 4 | +!! input |
| 5 | +<hiero>A1 - B2 D3</hiero> |
| 6 | +!! result |
| 7 | +<table class='mw-hiero-table mw-hiero-outer' dir='ltr'><tr><td> <table class="mw-hiero-table"><tr> <td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_A1.png' title='A1' alt='A1' /></td><td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_B2.png' title='B2' alt='B2' /></td><td><img style='margin:1px;' height='20' src='/w/extensions/wikihiero/img/hiero_D3.png' title='D3' alt='D3' /></td></tr></table> </td></tr></table> |
| 8 | + |
| 9 | +!! end |
| 10 | + |
| 11 | +!! test |
| 12 | +WikiHiero - XSS protection |
| 13 | +!! input |
| 14 | +<hiero><script>alert("FAIL")</script></hiero> |
| 15 | +!! result |
| 16 | +<table class='mw-hiero-table mw-hiero-outer' dir='ltr'><tr><td> <table class="mw-hiero-table"><tr> <td><script>alert(FAIL)<script></td> </tr></table> </td></tr></table> |
| 17 | + |
| 18 | +!! end |
| 19 | + |
| 20 | +!! test |
| 21 | +WikiHiero - prefabs |
| 22 | +!! input |
| 23 | +<hiero>a:A1</hiero> |
| 24 | +!! result |
| 25 | +<table class='mw-hiero-table mw-hiero-outer' dir='ltr'><tr><td> <table class="mw-hiero-table"><tr> <td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_a&A1.png' title='a&A1' alt='a&A1' /></td> </tr></table> </td></tr></table> |
| 26 | + |
| 27 | +!! end |
| 28 | + |
| 29 | +!! test |
| 30 | +WikiHiero - Horus name |
| 31 | +!! input |
| 32 | +<hiero>N28:Aa13-R19-t:N24</hiero> |
| 33 | +!! result |
| 34 | +<table class='mw-hiero-table mw-hiero-outer' dir='ltr'><tr><td> <table class="mw-hiero-table"><tr> <td><img style='margin:1px;' height='15' src='/w/extensions/wikihiero/img/hiero_N28.png' title='N28' alt='N28' /><br /><img style='margin:1px;' height='8' src='/w/extensions/wikihiero/img/hiero_Aa13.png' title='Aa13' alt='Aa13' /></td> <td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_R19.png' title='R19' alt='R19' /></td><td><img style='margin:1px;' height='11' src='/w/extensions/wikihiero/img/hiero_X1.png' title='X1 [t]' alt='t' /><br /><img style='margin:1px;' height='14' src='/w/extensions/wikihiero/img/hiero_N24.png' title='N24' alt='N24' /></td> </tr></table> </td></tr></table> |
| 35 | + |
| 36 | +!! end |
| 37 | + |
| 38 | +!! test |
| 39 | +WikiHiero - cartouche |
| 40 | +!! input |
| 41 | +<hiero>N5-O34:N29-N35:N35</hiero> |
| 42 | +!! result |
| 43 | +<table class='mw-hiero-table mw-hiero-outer' dir='ltr'><tr><td> <table class="mw-hiero-table"><tr> <td><img style='margin:1px;' height='18' src='/w/extensions/wikihiero/img/hiero_N5.png' title='N5' alt='N5' /></td><td><img style='margin:1px;' height='6' src='/w/extensions/wikihiero/img/hiero_O34.png' title='O34' alt='O34' /><br /><img style='margin:1px;' height='17' src='/w/extensions/wikihiero/img/hiero_N29.png' title='N29' alt='N29' /></td> <td><img style='margin:1px;' height='5' src='/w/extensions/wikihiero/img/hiero_N35.png' title='N35' alt='N35' /><br /><img style='margin:1px;' height='5' src='/w/extensions/wikihiero/img/hiero_N35.png' title='N35' alt='N35' /></td> </tr></table> </td></tr></table> |
| 44 | + |
| 45 | +!! end |
| 46 | + |
| 47 | +!! test |
| 48 | +WikiHiero - complex text with EOL |
| 49 | +!! input |
| 50 | +<hiero>M23-X1:R4-X8-Q2:D4-W17-R14-G4-R8-O29:V30-U23 ! |
| 51 | +N26-D58-O49:Z1-F13:N31-V30:N16:N21*Z1-D45:N25</hiero> |
| 52 | +!! result |
| 53 | +<table class='mw-hiero-table mw-hiero-outer' dir='ltr'><tr><td> <table class="mw-hiero-table"><tr> <td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_M23.png' title='M23' alt='M23' /></td><td><img style='margin:1px;' height='11' src='/w/extensions/wikihiero/img/hiero_X1.png' title='X1' alt='X1' /><br /><img style='margin:1px;' height='15' src='/w/extensions/wikihiero/img/hiero_R4.png' title='R4' alt='R4' /></td> <td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_X8.png' title='X8' alt='X8' /></td><td><img style='margin:1px;' height='24' src='/w/extensions/wikihiero/img/hiero_Q2.png' title='Q2' alt='Q2' /><br /><img style='margin:1px;' height='12' src='/w/extensions/wikihiero/img/hiero_D4.png' title='D4' alt='D4' /></td> <td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_W17.png' title='W17' alt='W17' /></td><td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_R14.png' title='R14' alt='R14' /></td><td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_G4.png' title='G4' alt='G4' /></td><td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_R8.png' title='R8' alt='R8' /></td><td><img style='margin:1px;' height='7' src='/w/extensions/wikihiero/img/hiero_O29.png' title='O29' alt='O29' /><br /><img style='margin:1px;' height='12' src='/w/extensions/wikihiero/img/hiero_V30.png' title='V30' alt='V30' /></td> <td><img style='margin:1px;' height='38' src='/w/extensions/wikihiero/img/hiero_U23.png' title='U23' alt='U23' /></td></tr></table><table class="mw-hiero-table"><tr> <td><img style='margin:1px;' height='15' src='/w/extensions/wikihiero/img/hiero_N26.png' title='N26' alt='N26' /></td><td><img style='margin:1px;' height='35' src='/w/extensions/wikihiero/img/hiero_D58.png' title='D58' alt='D58' /></td><td><img style='margin:1px;' height='18' src='/w/extensions/wikihiero/img/hiero_O49.png' title='O49' alt='O49' /><br /><img style='margin:1px;' height='16' src='/w/extensions/wikihiero/img/hiero_Z1.png' title='Z1' alt='Z1' /></td> <td><img style='margin:1px;' height='22' src='/w/extensions/wikihiero/img/hiero_F13.png' title='F13' alt='F13' /><br /><img style='margin:1px;' height='17' src='/w/extensions/wikihiero/img/hiero_N31.png' title='N31' alt='N31' /></td> <td><img style='margin:1px;' height='12' src='/w/extensions/wikihiero/img/hiero_V30.png' title='V30' alt='V30' /><br /><img style='margin:1px;' height='9' src='/w/extensions/wikihiero/img/hiero_N16.png' title='N16' alt='N16' /><br /><img style='margin:1px;' height='11' src='/w/extensions/wikihiero/img/hiero_N21.png' title='N21' alt='N21' /> <img style='margin:1px;' height='16' src='/w/extensions/wikihiero/img/hiero_Z1.png' title='Z1' alt='Z1' /></td> <td><img style='margin:1px;' height='24' src='/w/extensions/wikihiero/img/hiero_D45.png' title='D45' alt='D45' /><br /><img style='margin:1px;' height='16' src='/w/extensions/wikihiero/img/hiero_N25.png' title='N25' alt='N25' /></td> </tr></table> </td></tr></table> |
| 54 | + |
| 55 | +!! end |
Property changes on: trunk/extensions/wikihiero/tests.txt |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 56 | + native |
Index: trunk/extensions/wikihiero/wikihiero.php |
— | — | @@ -44,6 +44,8 @@ |
45 | 45 | $wgAutoloadClasses['WikiHiero'] = "$dir/wikihiero.body.php"; |
46 | 46 | $wgAutoloadClasses['SpecialHieroglyphs'] = "$dir/SpecialHieroglyphs.php"; |
47 | 47 | |
| 48 | +$wgParserTestFiles[] = "$dir/tests.txt"; |
| 49 | + |
48 | 50 | $wgSpecialPages['Hieroglyphs'] = 'SpecialHieroglyphs'; |
49 | 51 | $wgSpecialPageGroups['Hieroglyphs'] = 'wiki'; |
50 | 52 | |