Module:Wd/sandbox/testcases/testcaseTable
Appearance
-- work in progress
-- This is going to contain centralized testcases, which are currently triplicated.
-- dependencies used for generating expected outputs
local wdib = require("Module:WikidataIB")
local wd = require("Module:Wd") -- temporary, should be converted to wdib
return {
-- structure: tables, which contain test inputs for the module and corresponding correct outputs
-- These testcases were copied from the old testcase files (Module:wd/testcases/[1, 2, 3]).
{"property|Q55|P395", wdib._getValue{"P395",qid="Q55",noicon="true",osd="no",rank="best",maxvals="1",fwd="ALL"}},
{"property|P395", ""},
{"property|eid=Q55|P395", wdib._getValue{"P395",qid="Q55",noicon="true",osd="no",rank="best",maxvals="1",fwd="ALL"}},
{"property|eid=|P395", ""},
{"property|" .. wd._title{"Q55"} .. "|P395", ""},
{"property|:" .. wd._title{"Q55"} .. "|P395", wdib._getValue{"P395",qid="Q55",noicon="true",osd="no",rank="best",maxvals="1",fwd="ALL"}}
}