Index: trunk/extensions/TemplateAdventures/TemplateAdventures.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | 'author' => array( 'Svip' ), |
44 | 44 | 'url' => 'http://www.mediawiki.org/wiki/Extension:TemplateAdventures', |
45 | 45 | 'descriptionmsg' => 'ta-desc', |
46 | | - 'version' => '0.1' |
| 46 | + 'version' => '0.2' |
47 | 47 | ); |
48 | 48 | |
49 | 49 | |
Index: trunk/extensions/TemplateAdventures/taParserTests.txt |
— | — | @@ -0,0 +1,44 @@ |
| 2 | +!! test |
| 3 | +Just an author |
| 4 | +!! input |
| 5 | +{{#citation:|author=Wales, Jimmy}} |
| 6 | +!! result |
| 7 | +<p><span class="citation">Wales, Jimmy.</span> |
| 8 | +</p> |
| 9 | +!! end |
| 10 | + |
| 11 | +!! test |
| 12 | +Just an author by surname and given |
| 13 | +!! input |
| 14 | +{{#citation:|given=Jimmy|surname=Wales}} |
| 15 | +!! result |
| 16 | +<p><span class="citation">Wales, Jimmy.</span> |
| 17 | +</p> |
| 18 | +!! end |
| 19 | + |
| 20 | +!! test |
| 21 | +Two authors by surname and given |
| 22 | +!! input |
| 23 | +{{#citation:|given 1=Jimmy|surname 1=Wales|given 2=Jimmy|surname 2=Wales}} |
| 24 | +!! result |
| 25 | +<p><span class="citation">Wales, Jimmy & Wales, Jimmy.</span> |
| 26 | +</p> |
| 27 | +!! end |
| 28 | + |
| 29 | +!! test |
| 30 | +Three authors by surname and given |
| 31 | +!! input |
| 32 | +{{#citation:|given=Jimmy|surname=Wales|given 2=Jimmy|surname 2=Wales|given 3=Jimmy|surname 3=Wales}} |
| 33 | +!! result |
| 34 | +<p><span class="citation">Wales, Jimmy; Wales, Jimmy & Wales, Jimmy.</span> |
| 35 | +</p> |
| 36 | +!! end |
| 37 | + |
| 38 | +!! test |
| 39 | +An author with a link |
| 40 | +!! input |
| 41 | +{{#citation:|author=Wales, Jimmy |url=http://example.com/ |title=Example}} |
| 42 | +!! result |
| 43 | +<p><span class="citation">Wales, Jimmy. <a href="http://example.com/" class="external text" rel="nofollow">Example</a> |
| 44 | +</p> |
| 45 | +!! end |