Difference between revisions of "Module:Delink/testcases"
Jump to navigation
Jump to search
blackwiki>Mr. Stradivarius m (Undid revision 548428345 by Mr. Stradivarius (talk) that's not right) |
blackwiki>Mr. Stradivarius on tour (use self_preprocess_equals) |
||
| Line 1: | Line 1: | ||
| − | |||
local p = require('Module:UnitTests') | local p = require('Module:UnitTests') | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
function p:test_all() | function p:test_all() | ||
| − | + | self:preprocess_equals('{{#invoke:User:Mr. Stradivarius/sandbox2|delink|[[Apple]]}}', 'Apple') | |
| − | + | self:preprocess_equals('{{#invoke:User:Mr. Stradivarius/sandbox2|delink|[[Orange]]s are dissimilar to [[Apple]]s}}', 'Oranges are dissimilar to Apples') | |
| − | + | self:preprocess_equals('{{#invoke:User:Mr. Stradivarius/sandbox2|delink|All [[Gone]] [[wikt:to|]] [[Bed]] [[Now]]}}', 'All Gone to Bed Now') | |
| − | + | self:preprocess_equals('{{#invoke:User:Mr. Stradivarius/sandbox2|delink|[[Survey]] of [http://books.google.com Google Books] on [[UK|Britain]]}}', 'Survey of Google Books on Britain') | |
end | end | ||
| − | |||
return p | return p | ||
Revision as of 04:35, 3 April 2013
Documentation for this module may be created at Module:Delink/testcases/doc
local p = require('Module:UnitTests')
function p:test_all()
self:preprocess_equals('{{#invoke:User:Mr. Stradivarius/sandbox2|delink|[[Apple]]}}', 'Apple')
self:preprocess_equals('{{#invoke:User:Mr. Stradivarius/sandbox2|delink|[[Orange]]s are dissimilar to [[Apple]]s}}', 'Oranges are dissimilar to Apples')
self:preprocess_equals('{{#invoke:User:Mr. Stradivarius/sandbox2|delink|All [[Gone]] [[wikt:to|]] [[Bed]] [[Now]]}}', 'All Gone to Bed Now')
self:preprocess_equals('{{#invoke:User:Mr. Stradivarius/sandbox2|delink|[[Survey]] of [http://books.google.com Google Books] on [[UK|Britain]]}}', 'Survey of Google Books on Britain')
end
return p