Module:String/testcases

-- Unit tests for Module:String. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_len self:preprocess_equals_many(, {       {' foo ', '5'},        {'s= foo ', '3'},        {, '0'},        {'s=', '0'},        {'   ', '3'},    }) end

function p:test_replace self:preprocess_equals_many('', {       {'1.1.1.1|.|/', '1/1/1/1'},        {'alpha (beta)| (| gamma (', 'alpha gamma (beta)'},    }) end

function p:test_match self:preprocess_equals_many('', {       {'dog (cat)|%(%(a-)%)', 'cat'},    }) end

return p