Module:Example/testcases

-- Unit tests for Module:Example. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_hello self:preprocess_equals('', 'Hello World!') end

function p:test_hello_to self:preprocess_equals('', 'Hello, Fred!') end

function p:test_count_fruit self:preprocess_equals('', 'I have 5 bananas and 3 apples') self:preprocess_equals('', 'I have 1 banana and 1 apple') self:preprocess_equals('', 'I have 0 bananas and 0 apples') self:preprocess_equals('', 'I have 0 bananas and 0 apples')

end

function p:test_Name2 self:preprocess_equals('', 'Lonely') self:preprocess_equals('', 'Lonely') self:preprocess_equals('', 'Be positive!') self:preprocess_equals('', '1') end

return p