Модул:Template test case/testcases

С Википедије, слободне енциклопедије

Документацију овог модула можете да направите на страници Модул:Template test case/testcases/док

-- Unit tests for [[Module:Template test case]]. Click talk page to run tests.

local p = require('Module:UnitTests')

function p:test1_columns_output()
    self:preprocess_equals_preprocess(
        '{{#invoke:Template test case |main |_format=columns |_caption=_caption |_rowheader=_rowheader |_heading0=_heading0 |_heading1=_heading1 |_heading2=_heading2 |_heading3=_heading3 |_before=_before |_after=_after |_template1=Commons-inline |_template2=Commons category-inline |_template3=Commons and category-inline |Lorem ipsum|Lorem ipsum}}',
        '{{#invoke:Template test case/sandbox |main |_format=columns |_caption=_caption |_rowheader=_rowheader |_heading0=_heading0 |_heading1=_heading1 |_heading2=_heading2 |_heading3=_heading3 |_before=_before |_after=_after |_template1=Commons-inline |_template2=Commons category-inline |_template3=Commons and category-inline |Lorem ipsum|Lorem ipsum}}'
        )
end

function p:test1_columns_nowiki()
    self:preprocess_equals_preprocess(
        '{{#invoke:Template test case |main |_format=columns |_caption=_caption |_rowheader=_rowheader |_heading0=_heading0 |_heading1=_heading1 |_heading2=_heading2 |_heading3=_heading3 |_before=_before |_after=_after |_template1=Commons-inline |_template2=Commons category-inline |_template3=Commons and category-inline |Lorem ipsum|Lorem ipsum}}',
        '{{#invoke:Template test case/sandbox |main |_format=columns |_caption=_caption |_rowheader=_rowheader |_heading0=_heading0 |_heading1=_heading1 |_heading2=_heading2 |_heading3=_heading3 |_before=_before |_after=_after |_template1=Commons-inline |_template2=Commons category-inline |_template3=Commons and category-inline |Lorem ipsum|Lorem ipsum}}',
        {nowiki=1}
    )
end

return p