Module:Lang/testcases: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 259:
{'code=gem|text=test|translit=ʿarabī|translation=Arabic'}, -- not valid translations, the test is here to see the link with a collective lagnauge
{'code=ath|text=test|translit=ʿarabī|translation=Arabic'}, -- not valid translations, the test is here to see the link with a collective lagnauge
}, {nowiki=1})
end
 
 
--[[--------------------------< L I N K _ A N D _ L A B E L >------------------------------------------------------------------------
 
Tests various supported combinations of |link= and |label= combinations.
 
]]
 
function p:test_11_lang_xx_link_and_label()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|lang_xx_inherit|nocat=yes|', '}}', '{{#invoke:Lang|lang_xx_inherit|nocat=yes|', '}}',
{
{'code=uk|морити голодом|lit=to kill by starvation|translit=moryty holodom|label=none'},
{'code=uk|морити голодом|lit=to kill by starvation|translit=moryty holodom|label=none|link=no'},
{'code=ff|text=test|translit=something|translit-script=Adlm|label=none'},
{'code=ff|text=test|translit=something|translit-script=Adlm|label=test label'},
Line 272 ⟶ 286:
]]
 
function p:test_11_lang_xx_invert_italicstest_12_lang_xx_invert_italics()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|lang_xx_inherit|code=ar', '}}', '{{#invoke:Lang|lang_xx_inherit|code=ar', '}}',
{
Line 293 ⟶ 307:
]]
 
function p:test_12_transl_formatstest_13_transl_formats()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|transl|nocat=yes|', '}}', '{{#invoke:Lang|transl|nocat=yes|', '}}',
{
Line 323 ⟶ 337:
]]
 
function p:test_13_transl_italicstest_14_transl_italics()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|transl|nocat=yes|', '}}', '{{#invoke:Lang|transl|nocat=yes|', '}}',
{
Line 352 ⟶ 366:
]]
 
function p:test_14_category_from_tagtest_15_category_from_tag()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|category_from_tag|nocat=yes|link=yes|', '}}', '{{#invoke:Lang|category_from_tag|nocat=yes|link=yes|', '}}',
{
Line 371 ⟶ 385:
]]
 
function p:test_15_lang_errorstest_16_lang_errors()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|lang|nocat=yes|', '}}', '{{#invoke:Lang|lang|nocat=yes|', '}}',
{
Line 397 ⟶ 411:
 
 
function p:test_16_lang_xx_errorstest_17_lang_xx_errors()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|lang_xx_inherit|nocat=yes|', '}}', '{{#invoke:Lang|lang_xx_inherit|nocat=yes|', '}}',
{
Line 430 ⟶ 444:
]]
 
function p:test_17_transl_errorstest_18_transl_errors()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|transl|nocat=yes|', '}}', '{{#invoke:Lang|transl|nocat=yes|', '}}',
{
Line 455 ⟶ 469:
]]
 
function p:test_18_name_from_tag_errorstest_19_name_from_tag_errors()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|name_from_tag|nocat=yes|', '}}', '{{#invoke:Lang|name_from_tag|nocat=yes|', '}}',
{
Line 476 ⟶ 490:
]]
 
function p:test_19_tag_from_name_errorstest_20_tag_from_name_errors()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|tag_from_name|nocat=yes|', '}}', '{{#invoke:Lang|tag_from_name|nocat=yes|', '}}',
{
Line 490 ⟶ 504:
]]
 
function p:test_20_category_from_tag_errorstest_21_category_from_tag_errors()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|category_from_tag|nocat=yes|', '}}', '{{#invoke:Lang|category_from_tag|nocat=yes|', '}}',
{