Модуль:Languages/tests
< Модуль:Languages
Перейти к навигации
Перейти к поиску
Версия от 14:00, 20 марта 2022; Dzmuh (обсуждение | вклад) (Новая страница: «-- Unit tests for Module:URL. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_getRefHtml() self:preprocess_equals('{{...»)
-- Unit tests for [[Module:URL]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_getRefHtml()
self:preprocess_equals('{{#invoke:Languages | getRefHtmlFrame | }}', '')
self:preprocess_equals('{{#invoke:Languages | getRefHtmlFrame | xx }}', '')
self:preprocess_equals('{{#invoke:Languages | getRefHtmlFrame | en }}', '<span class="ref-info" title="Английский язык" style="cursor:help">(англ.)</span>')
self:preprocess_equals('{{#invoke:Languages | getRefHtmlFrame | ru }}', '<span class="ref-info" title="Русский язык" style="cursor:help">(рус.)</span>')
end
function p:test_getWikidataRefHtml()
self:preprocess_equals('{{#invoke:Languages | getWikidataRefHtmlFrame | }}', '')
self:preprocess_equals('{{#invoke:Languages | getWikidataRefHtmlFrame | QNNN }}', '')
self:preprocess_equals('{{#invoke:Languages | getWikidataRefHtmlFrame | Q1860 }}', '<span class="ref-info" title="Английский язык" style="cursor:help">(англ.)</span>')
self:preprocess_equals('{{#invoke:Languages | getWikidataRefHtmlFrame | Q7737 }}', '<span class="ref-info" title="Русский язык" style="cursor:help">(рус.)</span>')
end
return p