Module:Lang/testcases: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 355:
--[[ -------------------------- < C A T E G O R Y _ F R O M _ T A G > --------------------------
 
Category_from_tagcategory_from_tag category links.
 
A complete list of valid tests can be found here:
Line 367:
 
function p:test_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|', '}}',
{
{'sfsfsfsfr|link=yes'},
{'ber|link=yes'},
{'en|link=yes'},
{'en-gb|link=yes'},
{'fr'},
{'FR'},
{'ber'},
{'BER'},
{'en'},
{'EN'},
{'en-gb'},
{'EN-GB'},
{})
end
 
 
--[[ ========================== < N A M E _ F R O M _ T A G _ T E S T S > ========================== ]]
 
--[[ -------------------------- < CN A TM E G O R Y _ F R O M _ T A G _ E R R O R S > --------------------------
 
name_from_tag language links.
 
A complete list of valid tests can be found here:
* Module:Lang/testcases/ISO 639-1 name from tag
* Module:Lang/testcases/ISO 639-3-1 name from tag (A–H)
* Module:Lang/testcases/ISO 639-3-2 name from tag (I–N)
* Module:Lang/testcases/ISO 639-3-3 name from tag (O–Z)
* Module:Lang/testcases/ISO 639 deprecated and override name from tag
 
]]
 
function p:test_16_name_from_tag()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|category_from_tagname_from_tag|nocat=yes|', '}}', '{{#invoke:Lang|category_from_tagname_from_tag|nocat=yes|', '}}',
{
{'fr|link=yes'},
{'ber|link=yes'},
{'en|link=yes'},
{'en-gb|link=yes'},
{'fr'},
{'FR'},
{'ber'},
{'BER'},
{'en'},
{'EN'},
{'en-gb'},
{'EN-GB'},
})
end
 
 
--[[ ========================== < T A G _ F R O M _ N A M E _ T E S T S > ========================== ]]
 
--[[ -------------------------- < T A G _ F R O M _ N A M E > --------------------------
 
tag_from_name language links.
 
A complete list of valid tests can be found here:
* Module:Lang/testcases/ISO 639-1 tag from name
* Module:Lang/testcases/ISO 639-3-1 tag from name (A–H)
* Module:Lang/testcases/ISO 639-3-2 tag from name (I–N)
* Module:Lang/testcases/ISO 639-3-3 tag from name (O–Z)
* Module:Lang/testcases/ISO 639 deprecated and override tag from name
 
]]
 
function p:test_17_tag_from_name()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|tag_from_name|nocat=yes|', '}}', '{{#invoke:Lang|tag_from_name|nocat=yes|', '}}',
{
{'french'},
{'French'},
{'FRENCH'},
{'Berber Languages'},
{'Berber languages'},
{'British English'},
})
end
Line 385 ⟶ 455:
]]
 
function p:test_16_lang_errorstest_18_lang_errors()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|lang|nocat=yes|', '}}', '{{#invoke:Lang|lang|nocat=yes|', '}}',
{
Line 412 ⟶ 482:
 
 
function p:test_17_lang_xx_errorstest_19_lang_xx_errors()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|lang_xx_inherit|nocat=yes|', '}}', '{{#invoke:Lang|lang_xx_inherit|nocat=yes|', '}}',
{
Line 446 ⟶ 516:
]]
 
function p:test_18_transl_errorstest_20_transl_errors()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|transl|nocat=yes|', '}}', '{{#invoke:Lang|transl|nocat=yes|', '}}',
{
Line 454 ⟶ 524:
{'ar|AL|al-Khwarizmi'},
{'Arab|nasu \'\'aleunsur\'\' alnnayib|italic=yes|italics=no'},
}, {nowiki=1})
end
 
 
--[[ -------------------------- < C A T E G O R Y _ F R O M _ T A G _ E R R O R S > --------------------------
 
category_from_tag errors.
 
]]
 
function p:test_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|', '}}',
{
{'sfsfsfs'},
}, {nowiki=1})
end
Line 460 ⟶ 544:
--[[ -------------------------- < N A M E _ F R O M _ T A G _ E R R O R S > --------------------------
 
Name_from_tagname_from_tag errors.
 
A complete list of valid tests can be found here:
Line 471 ⟶ 555:
]]
 
function p:test_19_name_from_tag_errorstest_22_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 481 ⟶ 565:
--[[ -------------------------- < T A G _ F R O M _ N A M E _ E R R O R S > --------------------------
 
Tag_from_nametag_from_name errors.
 
A complete list of valid tests can be found here:
Line 492 ⟶ 576:
]]
 
function p:test_20_tag_from_name_errorstest_23_tag_from_name_errors()
self:preprocess_equals_preprocess_many('{{#invoke:Lang/sandbox|tag_from_name|nocat=yes|', '}}', '{{#invoke:Lang|tag_from_name|nocat=yes|', '}}',
{
{'sfsfsfs'},
}, {nowiki=1})
end
 
 
--[[ -------------------------- < C A T E G O R Y _ F R O M _ T A G _ E R R O R S > --------------------------
 
Category_from_tag errors.
 
]]
 
function p:test_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|', '}}',
{
{'sfsfsfs'},