Module:LangSwitch/testcases

-- Unit tests for Module:LangSwitch. Click talk page to run tests. local p = require('Module:UnitTests')

function p:test_langSwitch_without_default self:preprocess_equals_many('', {{'en', 'English'}, {'fr', 'English'}, {'co', 'Corsu'}}) self:preprocess_equals_many('', {{'en', 'English'}, {'de', 'German'},  {'gsw', 'German'}}) self:preprocess_equals_many ('', {{'en', 'English'}, {'de', 'English'},  {'gsw', 'Alemanic'}}) end

function p:test_langSwitch_with_default self:preprocess_equals_many('', {{'en', 'default'}, {'it', 'Italian'}, {'co', 'Italian'}}) self:preprocess_equals_many('', {{'en', 'English'}, {'it', 'default'}, {'co', 'Corsu'}}) self:preprocess_equals_many(, {{'en', }, {'it', 'Italian'}, {'co', 'Italian'}}) self:preprocess_equals_many(, {{'en', 'English'}, {'it', }, {'co', 'Corsu'}}) self:preprocess_equals_many('', {{'en', 'English'}, {'it', 'default'}, {'co', 'Corsu'}}) end

return p