View source for Module:Hatnote/testcases

Jump to navigation Jump to search

You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: Users.


You can view and copy the source of this page.

local mHatnote = require('Module:Hatnote/sandbox') -- the module to be tested
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()
function suite:assertError(func, ...)
local success, result = pcall(func, ...)
self:assertFalse(success)
end
function suite:assertNotEquals(expected, actual)
self:assertTrue(expected ~= actual)
end
function suite:assertParentFrameCallEquals(expected, func, args)
args = args or {}
local current = mw.getCurrentFrame()
local parent = current:newChild{title = 'Parent', args = args}
local child = parent:newChild{title = 'Child'}
self:assertEquals(expected, func(child))
end
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Template used on this page:

Return to Module:Hatnote/testcases.