Module:Wd/testcases: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 40:
self:preprocess_equals('{{#invoke:wd|property|unit|raw|Q55|P2884}}', 'Q25250')
self:preprocess_equals('{{#invoke:wd|property|Q55|P625}}', ({string.gsub(({string.gsub(({string.gsub(wdib._getValue{'P625',qid='Q55',noicon='true',osd='no',rank='best',maxvals='1',fwd='ALL'}, "′", "'", 2)})[1], '″', '"', 2)})[1], ' ', ', ', 1)})[1])
self:preprocess_equals('{{#invoke:wd|property|linked|Q55|P625}}', '[https://tools.wmflabs.org/geohack/geohack.php?language=en&params=' .. ({stringmw.ustring.gsub(wdib._getValue{'P625',qid='Q55',noicon='true',osd='no',rank='best',maxvals='1',fwd='ALL'}, '[°′″ ]', '_')})[1] .. '_globe:earth ' .. ({string.gsub(({string.gsub(({string.gsub(wdib._getValue{'P625',qid='Q55',noicon='true',osd='no',rank='best',maxvals='1',fwd='ALL'}, "′", "'", 2)})[1], '″', '"', 2)})[1], ' ', ', ', 1)})[1] .. ']')
self:preprocess_equals('{{#invoke:wd|property|raw|Q55|P625}}', ({stringmw.ustring.gsub(wdib._getValue{'P625',qid='Q55',noicon='true',osd='no',rank='best',maxvals='1',fwd='ALL'}, '[°′″ ]', '/')})[1])
self:preprocess_equals('{{#invoke:wd|property|Q55|coord}}', ({string.gsub(({string.gsub(({string.gsub(wdib._getValue{'P625',qid='Q55',noicon='true',osd='no',rank='best',maxvals='1',fwd='ALL'}, "′", "'", 2)})[1], '″', '"', 2)})[1], ' ', ', ', 1)})[1])
self:preprocess_equals('{{#invoke:wd|property|linked|Q55|P41}}', '[[c:File:' .. wdib._getValue{'P41',qid='Q55',noicon='true',osd='no',rank='best',maxvals='1',fwd='ALL'} .. '|' .. wdib._getValue{'P41',qid='Q55',noicon='true',osd='no',rank='best',maxvals='1',fwd='ALL'} .. ']]')