Module:String2/testcases
Appearance
![]() | This is the test cases page for the module Module:String2. Results of the test cases. |
-- Unit tests for [[Module:{{ROOTPAGENAME}}]]. Click talk page to run tests.
local p = require('Module:UnitTests')
-- Example unit test.
function p:test_matchAny()
self:preprocess_equals('{{#invoke:Example|matchAny|123|abc|source=adc 123}}', '1')
self:preprocess_equals('{{#invoke:Example|matchAny|123|abc|source=adc 124}}', '')
self:preprocess_equals('{{#invoke:Example|matchAny|123|abc|source=abc 124}}', '2')
self:preprocess_equals('{{#invoke:Example|matchAny|12[3-6]|a[b-e]c|source=adc 129|plain=false}}', '2')
end
return p