మాడ్యూల్:Wd/testcases/4
Appearance
< మాడ్యూల్:Wd | testcases
This is a test cases page for the module మాడ్యూల్:Wd. Results of the test cases. |
-- Unit tests for [[Module:Wd]]. Click talk page to run tests.
-- Telugu Wikipedia specific tests to debug reference parameter
local p = require('Module:UnitTests')
local wd = require('Module:Wd')
local wdsb = require('Module:Wd/sandbox')
function p:test_sandbox_vs_live()
self:preprocess_equals('{{#invoke:wd/sandbox|references|raw|Q55|P1082|16829289}}', wd._references{'raw','Q55','P1082','16829289'})
-- entity with 'stated in' and 'reference URL'
self:preprocess_equals('{{#invoke:wd/sandbox|references|raw|Q60165552|P1082|P585=2011}}', wd._references{'raw','Q60165552','P1082', 'P585=2011'})
-- entity with only 'stated in'
self:preprocess_equals('{{#invoke:wd/sandbox|references|raw|Q60165513|P1082|P585=2011}}', wd._references{'raw','Q60165513','P1082', 'P585=2011'})
end
return p