User:Daveh/Test Upgrade

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

A bunch of of things useful to make sure works after upgrading the wiki.

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

Icon-Information.png Graphs are currently disabled due to a security issue.


line

Icon-Information.png Graphs are currently disabled due to a security issue.


pie

Icon-Information.png Graphs are currently disabled due to a security issue.


Scatter

Icon-Information.png 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}}
{{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 {{Template:FULLPAGENAME0/Case Test}}, {{Template:FULLPAGENAME0/Case Test|text=Same case}}, {{Template:FULLPAGENAME0/Case Test|Text=Different case}} {{{text}}}, Same case, Different case
Multiple values in sequence {{Template:FULLPAGENAME0/Case Test|TEXT=UPPER CASE|Text=Mixed case|text=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]

UESPWiki:MetaTemplate/Inherit

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
  • Value: 1 (0x01) is odd
  • Value: 3 (0x11) is odd
  • Value: 1 (0x01) is odd
  • Value: 3 (0x11) is odd

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

User:Daveh/Listsaved

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.

[[{{fullurl:Template:FULLPAGENAME0|action=edit}} edit table]]
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 Template:NESTLEVEL 0
Used in Template {{ Template:FULLPAGENAME0/Test}} 1
Override (General) Template:NESTLEVEL 2
Override (Zero) Template:NESTLEVEL 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).