Difference between revisions of "Template:Diff2/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Waldyrious
(readability)
imported>Amalthea
(testcases are a bit misleading with automatic link numbering, but please note that 2 and 4 currently produce different results!)
Line 1: Line 1:
{|
+
{{testcase
! sandbox !! expected
+
|id=1. revid
|-
+
|<nowiki>X{{diff2       |123}}X</nowiki>
| a{{diff2/sandbox|123}}b
+
|       X{{diff2        |123}}X
| a<span class="plainlinks">[{{SERVER}}{{SCRIPTPATH}}/index.php?title=&diff=prev&oldid=123]</span>b
+
|        X{{diff2/sandbox|123}}X
|-
+
}}
| a{{diff2/sandbox|123|Foo}}b
+
 
| a<span class="plainlinks">[{{SERVER}}{{SCRIPTPATH}}/index.php?title=&diff=prev&oldid=123 Foo]</span>b
+
{{testcase
|-
+
|id=2. revid & title
| a{{diff2/sandbox|123|Foo|Bar}}b
+
|<nowiki>X{{diff2        |123|Foo}}X</nowiki>
| a<span class="plainlinks">[{{SERVER}}{{SCRIPTPATH}}/index.php?title=&diff=prev&oldid=123#Foo Bar]</span>b
+
|       X{{diff2        |123|Foo}}X
|-
+
|       X{{diff2/sandbox|123|Foo}}X
| a{{diff2/sandbox|123|Foo|}}b
+
}}
| a<span class="plainlinks">[{{SERVER}}{{SCRIPTPATH}}/index.php?title=&diff=prev&oldid=123#Foo]</span>b
+
 
|}
+
{{testcase
 +
|id=3. revid & anchor & title
 +
|<nowiki>X{{diff2        |123|Foo|Bar}}X</nowiki>
 +
|       X{{diff2        |123|Foo|Bar}}X
 +
|       X{{diff2/sandbox|123|Foo|Bar}}X
 +
}}
 +
 
 +
{{testcase
 +
|id=4. revid & anchor & empty title
 +
|<nowiki>X{{diff2        |123|Foo|}}X</nowiki>
 +
|       X{{diff2        |123|Foo|}}X
 +
|       X{{diff2/sandbox|123|Foo|}}X
 +
}}
 +
 
 +
{{testcase
 +
|id=5. revid & empty anchor & title
 +
|<nowiki>X{{diff2        |123||Bar}}X</nowiki>
 +
|        X{{diff2        |123||Bar}}X
 +
|        X{{diff2/sandbox|123||Bar}}X
 +
}}

Revision as of 18:32, 4 February 2011