Mô đun:Time/testcases

Bách khoa toàn thư mở Wikipedia
local p = require('Module:UnitTests')

function p:test_fday()
    self:preprocess_equals('{{#time:Y|ngày 19 tháng 4 năm 2000}}', '2000')
end

function p:test_f1day()
    self:preprocess_equals('{{#time:Y|19 tháng 4 năm 2000}}', '2000')
end

function p:test_f2day()
    self:preprocess_equals('{{#time:Y|tháng 4 năm 2000}}', '2000')
end

-- function p:test_f3day()
--     self:preprocess_equals('{{#time:Y|19/04/2000}}', '2000')
-- end

-- function p:test_f4day()
--     self:preprocess_equals('{{#time:Y|19-04-2000}}', '2000')
-- end

return p