Jump to content
Wikipedia The Free Encyclopedia

Module:PageLinks/sandbox testcases

From Wikipedia, the free encyclopedia
Module documentation[create] [purge]
You might want to create a documentation page for this Scribunto module.
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this module.
 localp=require('Module:UnitTests')

 functionp:test_basic()
 self:preprocess_equals('{{#invoke:PageLinks/sandbox | main | t | page=Example }}','<span>[[:Example]]&nbsp;([[Talk:Example|talk]])</span>')
 end

 functionp:test_category()
 self:preprocess_equals('{{#invoke:PageLinks/sandbox | main | t | page=Category:Example }}','[[:Category:Example|Category:Example]]&nbsp;([[Category talk:Example|talk]])')
 end

 functionp:test_talk()
 self:preprocess_equals('{{#invoke:PageLinks/sandbox | single | t | page=Example }}','[[Talk:Example|talk]]')
 end

 functionp:test_views()
 self:preprocess_equals('{{#invoke:PageLinks/sandbox | single | vlm-sgs | page=Example }}','[http://stats.grok.se/en/201312/Example stats]')
 end

 functionp:test_logs()
 self:preprocess_equals('{{#invoke:PageLinks/sandbox | single | tl | page=Sylven Landesberg }}','[//en.wikipedia.org/w/index.php?title=Special%3ALog&page=Sylven+Landesberg logs]')
 end

 returnp

AltStyle によって変換されたページ (->オリジナル) /