User:Daveh/Test Upgrade
A bunch of of things useful to make sure works after upgrading the wiki.
Contents
- 1 Syntax Highlighter
- 2 Graph
- 3 MetaTemplate/Riven
- 3.1 Riven Debug
- 3.2 Riven Arg
- 3.3 MetaTemplate Define
- 3.4 MetaTemplate Local
- 3.5 MetaTemplate Preview
- 3.6 MetaTemplate Unset
- 3.7 MetaTemplate Inherit
- 3.8 MetaTemplate Return
- 3.9 MetaTemplate Listsaved
- 3.10 MetaTemplate Load
- 3.11 MetaTemplate Preload
- 3.12 MetaTemplate Save
- 3.13 MetaTemplate Catpagetemplate
- 3.14 MetaTemplate Savemarkup
- 3.15 MetaTemplate NestLevel
- 3.16 MetaTemplate If
- 4 EmbedVideo
- 5 TimedMediaHandler / MWEmbedSupport
- 6 Scribunto
Syntax Highlighter[edit]
1 def quick_sort(arr):
2 less = []
3 pivot_list = []
4 more = []
5 if len(arr) <= 1:
6 return arr
7 else:
8 pass
9
Graph[edit]
Bar
32px | Graphs are currently disabled due to a security issue. |
line
32px | Graphs are currently disabled due to a security issue. |
pie
32px | Graphs are currently disabled due to a security issue. |
Scatter
32px | Graphs are currently disabled due to a security issue. |
MetaTemplate/Riven[edit]
Riven Debug[edit]
Description | Result | Expected Result | |
---|---|---|---|
#include (preview only) | Page view: Blank Preview: {{UESPWiki:Riven/SplitTest}} |
||
#splitargs |
|
{{FC|1=red|2=abc}}{{FC|1=blue|2=123}} |
|
<cleanspace> |
[[Main Page]]{{Echo|123}} |
[[Main Page]]{{Echo|123}} |
|
<cleantable> |
<table class="wikitable"> <tr> <th> Header </th> <th> Data </th> </tr> <tr> <th> Race </th> <td> Dunmer </td> </tr> </table> |
<table class="wikitable"> <tr> <th> Header </th> <th> Data </th> </tr> <tr> <th> Race </th> <td> Dunmer </td> </tr> </table> |
Riven Arg[edit]
Description | Result | Expected Result |
---|---|---|
Arg test | "It works!" (if you click here; otherwise, blank) | |
Arg default | It works! | It works! (always) |
Arg invalid URL characters | ||
Arg empty | ||
Arg no colon | {{#arg}} | {{#arg}} |
MetaTemplate Define[edit]
Description | Result | Expected Result |
---|---|---|
Basic | Define | Define |
After Define | Define 1 | Define 1 |
After Local | Local | Local |
After Preview | Define | Define in page view Preview in preview mode |
Case | {{{text}}}, Same case, Different case | {{{text}}}, Same case, Different case |
Multiple values in sequence | lower case | lower case |
Empty value defined as text with case=any | {{{text}}} / {{{TeXt}}} | {{{text}}} / {{{TeXt}}} |
TeXt=MiXeD to lower, define text as nothing but case=any | MiXeD to lower / MiXeD to lower | MiXeD to lower / MiXeD to lower |
TeXt=MiXeD with case=any, Set to "MiXeD" | {{{text}}} / MiXeD | {{{text}}} / MiXeD |
MetaTemplate Local[edit]
Description | Result | Expected Result |
---|---|---|
Basic | Local | Local |
After Define | Local | Local |
After Preview | Local | Local |
Override Default | Local | Local |
MetaTemplate Preview[edit]
Description | Result | Expected Result |
---|---|---|
Basic | {{{preview}}} | {{{preview}}} in page view Preview in preview mode |
After Define | Define | Define |
After Local | Local | Local |
MetaTemplate Unset[edit]
Description | Result | Expected Result |
---|---|---|
Basic | ac | ac |
Multiple | {{{a}}}{{{b}}}{{{c}}} | {{{a}}}{{{b}}}{{{c}}} |
Numeric, unshifted | 1{{{2}}}3 | 1{{{2}}}3 |
Numeric, shifted | 13{{{3}}} | 13{{{3}}} |
MetaTemplate Inherit[edit]
MetaTemplate Return[edit]
Description | Result | Expected Result |
---|---|---|
Regular | {{{test}}} | Test |
Return into | {{{test2}}} | Test 2 |
MetaTemplate Listsaved[edit]
Description | Result | Expected Result |
---|---|---|
Standard list of results |
|
|
MetaTemplate Load[edit]
Note that this page relies on the Save page.
Description | Var Name | Result | Expected Result |
---|---|---|---|
Plain text | plain | This has no special formatting of any kind. | This has no special formatting of any kind. |
Complex | complex | This is *another* test with more complex formatting. | This is *another* test with more complex formatting. |
Numeric | 2 | I have a very bad feeling about this! | I have a very bad feeling about this! |
Undefined variable | 1 | This is a {{{passed}}} test. | This is a {{{passed}}} test. |
Blank | blank | ||
False | false | false | false |
Templates parsed before save | unparsed | This is a test. | This is a test. |
Zero | zero | 0 | 0 |
Not found | none | {{{none}}} | {{{none}}} |
MetaTemplate Preload[edit]
All boxes appearing in the middle of the results should read as shown below and there should be no bare {{{variables}}} of any kind. Anything else represents a failed test.
Requested: value|binary|parity Needed: value|binary|parity From cache: binary|parity From DB: value
MetaTemplate Save[edit]
Because saved variables can't really be loaded without depending on the validity of the #load command (and other things in the more advance usages), expected results listed here are the values you would expect to see in Special:MetaVarsOnPage. Tests are listed in the order you should see them there.
Description | Var Name | Displayed Value | Expected Display | Expected Save (here) |
---|---|---|---|---|
Not defined | none | (Should not appear in results) | ||
Passed value | 1 | This is a {{{passed}}} test. | This is a {{{passed}}} test. | This is a {{{passed}}} test. |
Numeric save | 2 | I have a very bad feeling about this! | I have a very bad feeling about this! | I have a very bad feeling about this! |
Blank | blank | |||
False | false | false | false | false |
Has link | link | parent page | parent page | [[../|parent page]] |
Plain text | plain | This has no special formatting of any kind. | This has no special formatting of any kind. | This has no special formatting of any kind. |
Has template, but no |savemarkup=1 |
template | This is a test. | This is a test. | This is a test. |
Zero | zero | 0 | 0 | 0 |
Does not need parsed but has |savemarkup=1 |
test:nomarkup | Hello, world! | Hello, world! | Hello, world! |
Needs parsed based on |savemarkup=1 |
unparsed | This is a test. | This is a test. | This is {{Echo|a test}}. |
MetaTemplate Catpagetemplate[edit]
MetaTemplate Savemarkup[edit]
UESPWiki:MetaTemplate/Savemarkup
MetaTemplate NestLevel[edit]
Note: Used in Template result will be 2 instead of 1 here due to transclusion. Other results should match.
Description | Result | Expected Result |
---|---|---|
Current Page | 1 | 0 |
Used in Template | 2 | 1 |
Override (General) | 1 | 2 |
Override (Zero) | 1 | 0 |
MetaTemplate If[edit]
Description | Result | Expected Result |
---|---|---|
Missing (results in {{{1}}}) | if | if |
Empty | ifnot | ifnot |
0 | ifnot | ifnot |
1 | if | if |
Variable not found {{{zzznotfoundzzz}}} |
if | if |
If/ifnot combo | ififnot | both |
Random text | if | if |
EmbedVideo[edit]
TimedMediaHandler / MWEmbedSupport[edit]
Video
Video Thumbnail
OGG
Midi File:Midi.mid
Scribunto[edit]
Expect: Hello World! 1234 !
Result: Hello World! 1234 !
NIL Error:
Lua error in Module:Test_Scribunto at line 5: attempt to concatenate local 'name' (a nil value).