跳转到内容

模組:WikitextLC/testcases

维基百科,自由的百科全书

这是Module:WikitextLC/testcases当前版本,由YFdyh000留言 | 贡献编辑于2023年10月27日 (五) 19:54。这个网址是本页该版本的固定链接。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)
-- [[Module:Test]]的單元測試範例,前往討論頁以執行測試。
local p = require('Module:UnitTests')
local lc = require( 'Module:WikitextLC' )
local lcs = require( 'Module:WikitextLC/sandbox' )

function p:test_a()
	self:preprocess_equals(lc.converted("中文測試","zh-cn"), '中文测试')
end
function p:test_a_sandbox()
	self:preprocess_equals(lcs.converted("中文測試","zh-cn"), '中文测试')
end

function p:test_notconverted()
	self:preprocess_equals(lc.converted("測試:-{A協会}-","zh-cn"), '测试:A協会')
end
function p:test_notconverted_sandbox()
	self:preprocess_equals(lcs.converted("測試:-{A協会}-","zh-cn"), '测试:A協会')
end

return p