Difference between revisions of "Template:Portal maintenance status/testcases"

From blackwiki
Jump to navigation Jump to search
test>Dreamy Jazz
(→‎Manual: add testcase)
test>Evad37
(→‎main function: test cases for note parameter)
Line 213: Line 213:
 
|{{#invoke:Portal maintenance status|main}}
 
|{{#invoke:Portal maintenance status|main}}
 
|{{#invoke:Portal maintenance status/sandbox|main}}
 
|{{#invoke:Portal maintenance status/sandbox|main}}
 +
 +
|-
 +
|colspan=2|'''If the portal contains {{tld|Portal maintenance status|2=note=Some note}}'''
 +
|-
 +
|{{#invoke:Portal maintenance status|main|demo=Portal maintenance status{{!}}note=Some note}}
 +
|{{#invoke:Portal maintenance status/sandbox|main|demo=Portal maintenance status{{!}}note=Some note}}
 +
 +
|-
 +
|colspan=2|'''If the portal contains {{tld|Portal maintenance status|2=note=Some note with a <nowiki>{{tl|tl}}</nowiki> template}}'''
 +
|-
 +
|{{#invoke:Portal maintenance status|main|demo=Portal maintenance status{{!}}note=Some note with a {{tl{{!}}tl}} template}}
 +
|{{#invoke:Portal maintenance status/sandbox|main|demo=Portal maintenance status{{!}}note=Some note with a {{tl{{!}}tl}} template}}
 +
 +
|-
 +
|colspan=2|'''If the portal contains {{tld|Portal maintenance status|2=note=Some note with <nowiki>{{tl|tl}}</nowiki> and <nowiki>{{tlx|tlx}}</nowiki> templates}}'''
 +
|-
 +
|{{#invoke:Portal maintenance status|main|demo=Portal maintenance status{{!}}note=Some note with {{tl{{!}}tl}} and {{tlx{{!}}tlx}} templates}}
 +
|{{#invoke:Portal maintenance status/sandbox|main|demo=Portal maintenance status{{!}}note=Some note with {{tl{{!}}tl}} and {{tlx{{!}}tlx}} templates}}
  
 
|}
 
|}

Revision as of 09:05, 9 July 2018

Template testcases

Date

Template:Testcase table

Template:Testcase table

Manual

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Non-standard

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Incomplete

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Subpages

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Multiple flags

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Embed

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Template:Testcase table

Module testcases

main function

Module:Portal maintenance status Module:Portal maintenance status/sandbox
If the portal contains {{Portal maintenance status}}
If the portal contains {{Portal maintenance status|manual=yes}}
If the portal contains {{Portal maintenance status|manual=yes|maintainer1=Example}}
If the portal contains {{Portal maintenance status|nonstandard=yes}}
If the portal contains {{Portal maintenance status|manual=yes|nonstandard=yes}}
If the portal contains {{Portal maintenance status|subpages=single}}
If the portal contains {{Portal maintenance status|subpages=checked}}
If the portal contains {{Portal maintenance status|manual=yes|nonstandard=yes|subpages=single}}
If the portal contains {{Portal maintenance status|manual=yes|nonstandard=yes|subpages=checked}}
If the portal contains {{Portal maintenance status|manual=yes|nonstandard=yes|incomplete=yes}}
If the portal does not contain the template, there should be no output
If used in the wrong namespace, an error should be reported
Lua error in Module:Portal_maintenance_status at line 45: attempt to index field '?' (a nil value). Lua error in Module:Portal_maintenance_status/sandbox at line 45: attempt to index field '?' (a nil value).
If the portal contains {{Portal maintenance status|note=Some note}}
If the portal contains {{Portal maintenance status|note=Some note with a {{tl|tl}} template}}
If the portal contains {{Portal maintenance status|note=Some note with {{tl|tl}} and {{tlx|tlx}} templates}}

historical function

Module:Portal maintenance status Module:Portal maintenance status/sandbox
If the project page contains {{Historical}}
yes yes
If the project page contains {{Historical|foo}}
yes yes


If the portal does not contain the template, there should be no output
If used in the wrong namespace, an error should be reported
Lua error: Wrong namespace. Lua error: Wrong namespace.