Moduldiskusjon:Wb/testtilfeller

Sideinnhaldet er ikkje støtta på andre språk.
Frå Wikipedia – det frie oppslagsverket

3 tests failed.

test_Entity_from_Wikidata:

Text Expected Actual
Y Testing entity .. Entity Entity
Y Testing entity .. "table" "table"
Y Testing entity .. item item
Y Testing entity .. Q48414 Q48414
Y Testing entity .. number number
Y Non-existing label nil nil
Y English labels code en en
Y English labels value Sør-Aurdal Sør-Aurdal
Y Non-existing description nil nil
Y English descriptions code en en
N English descriptions value municipality in Oppland, Norway municipality in Innlandet, Norway
Y Non-existing alias nil nil
Y English aliases value table table

test_load:

Text Expected Actual
Y {{#invoke:Wb | run | Q48414 | signature }} Entity Entity
Y {{#invoke:Wb | run | Q48414 | type }} item item
Y {{#invoke:Wb | run | Q48414 | id }} Q48414 Q48414
Y {{#invoke:Wb | run | Q48414 | label }} Sør-Aurdal Sør-Aurdal
N {{#invoke:Wb | run | Q48414 | description }} kommune i Oppland fylke, i landskapet og dalføret Valdres, i Norge kommune i Innlandet fylke, i landskapet og dalføret Valdres, i Norge
N {{#invoke:Wb | run | Q48414 | Dette er en %{foo} test}} Sør-Aurdal Lua-feil i Modul:Wb, line 438: attempt to call a table value.

test_operations:

Text Expected Actual
Y Equality true true
Y Equality false false
Y Inequality false false
Y Inequality true true
Y Similar start true true
Y Similar start false false
Y Similar start with spes char true true
Y Similar start with spes char false false
Y Similar start negated false false
Y Similar start negated true true
Y Similar end false false
Y Similar end true true
Y Similar end negated true true
Y Similar end negated false false
Y Greater than or equal true true
Y Greater than or equal true true
Y Greater than or equal false false
Y Greater than or equal false false
Y Greater than or equal true true
Y Greater than or equal true true
Y Greater than true true
Y Greater than false false
Y Greater than false false
Y Greater than false false
Y Greater than false false
Y Greater than true true
Y Lesser than false false
Y Lesser than false false
Y Lesser than true true
Y Lesser than true true
Y Lesser than false false
Y Lesser than false false
Y Lesser than or equal false false
Y Lesser than or equal true true
Y Lesser than or equal true true
Y Lesser than or equal true true
Y Lesser than or equal true true
Y Lesser than or equal false false