Modul:body-text/test

Hej, du har kommit hit för att leta efter betydelsen av ordet Modul:body-text/test. I DICTIOUS hittar du inte bara alla ordboksbetydelser av ordet Modul:body-text/test, utan du får också veta mer om dess etymologi, dess egenskaper och hur man säger Modul:body-text/test i singular och plural. Allt du behöver veta om ordet Modul:body-text/test finns här. Definitionen av ordet Modul:body-text/test hjälper dig att vara mer exakt och korrekt när du talar eller skriver dina texter. Genom att känna till definitionen avModul:body-text/test och andra ord berikar du ditt ordförråd och får tillgång till fler och bättre språkliga resurser.

All tests passed. (refresh)

Text Expected Actual
test1_singleLine:
Passed >{{#invoke:body-text|getWikitext|Sentence on a single line.}}< >Sentence on a single line.< >Sentence on a single line.<
Text Expected Actual
test2_paragraph:
Passed {{#invoke:body-text|getWikitext|First

paragraph Second paragraph Third paragraph is a sentence.}}

First paragraph<div>Second paragraph</div><div>Third paragraph is a sentence.</div> First paragraph<div>Second paragraph</div><div>Third paragraph is a sentence.</div>
Text Expected Actual
test3_categorizeList:
Passed >{{#invoke:body-text|getWikitext|*Single line list.}}< >

*Single line list.]<

>

*Single line list.]<

Passed >{{#invoke:body-text|getWikitext|

*Single line list.}}<

>

*Single line list.]<

>

*Single line list.]<

Passed >{{#invoke:body-text|getWikitext|*:Indented list.}}< >

*:Indented list.]<

>

*:Indented list.]<

Passed >{{#invoke:body-text|getWikitext|#Ordered}}< >

#Ordered]<

>

#Ordered]<

Passed >{{#invoke:body-text|getWikitext|;Definition term}}< >

;Definition term]<

>

;Definition term]<

Passed >{{#invoke:body-text|getWikitext|:Definition data}}< >

:Definition data]<

>

:Definition data]<

Passed >{{#invoke:body-text|getWikitext|

*Multi-line *list.}}<

>

*Multi-line *list.]<

>

*Multi-line *list.]<

Passed >{{#invoke:body-text|getWikitext|Paragraph

and *list *list.}}<

>Paragraph

and *list *list.]<

>Paragraph

and *list *list.]<

local t = require("Module:UnitTests")
local mut = require("Module:body-text")

-- Tests are surrounded by > and <, in order to more easily discern differences in newlines.

function t:test1_singleLine()
	self:preprocess_equals(">{{#invoke:body-text|getWikitext|Sentence on a single line.}}<", ">Sentence on a single line.<", {nowiki=1})
end

function t:test2_paragraph()
	self:preprocess_equals("{{#invoke:body-text|getWikitext|First\nparagraph\n\nSecond paragraph\n\nThird\nparagraph\nis\na\nsentence.}}", "First paragraph<div>Second paragraph</div><div>Third paragraph is a sentence.</div>", {nowiki=1})
end

function t:test3_categorizeList()
	self:preprocess_equals(">{{#invoke:body-text|getWikitext|*Single line list.}}<", ">\n*Single line list.]<", {nowiki=1})
	self:preprocess_equals(">{{#invoke:body-text|getWikitext|\n*Single line list.}}<", ">\n*Single line list.]<", {nowiki=1})
	self:preprocess_equals(">{{#invoke:body-text|getWikitext|*:Indented list.}}<", ">\n*:Indented list.]<", {nowiki=1})
	self:preprocess_equals(">{{#invoke:body-text|getWikitext|#Ordered}}<", ">\n#Ordered]<", {nowiki=1})
	self:preprocess_equals(">{{#invoke:body-text|getWikitext|;Definition term}}<", ">\n;Definition term]<", {nowiki=1})
	self:preprocess_equals(">{{#invoke:body-text|getWikitext|:Definition data}}<", ">\n:Definition data]<", {nowiki=1})
	self:preprocess_equals(">{{#invoke:body-text|getWikitext|\n*Multi-line\n*list.}}<", ">\n*Multi-line\n*list.]<", {nowiki=1})
	self:preprocess_equals(">{{#invoke:body-text|getWikitext|Paragraph\n\nand\n\n*list\n*list.}}<", ">Paragraph\n\nand\n\n*list\n*list.]<", {nowiki=1})
end



return t