Jump to content

Module:ParameterCount/testcases: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Created page with '-- Unit tests for Module:ParameterCount. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_main() self:preprocess_equa...'
(No difference)

Revision as of 16:31, 17 April 2021

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

function p:test_main()
    self:preprocess_equals_all('{{#invoke:ParameterCount|all|', '}}', {
    	{'', '0'},
    	{'A', '1'},
    	{'k=v', '1'},
    	{'A|B', '2'},
    	{'A|k=v', '2'},
    	{'k=v|A', '2'},
    	{'A|B|C', '3'},
    	{'A|B|k=v', '3'},
    	{'1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40', '40'},
    })
end

return p