Difference between revisions of "Module:User:DePiep/sandbox/testcases"

From blackwiki
Jump to navigation Jump to search
blackwiki>DePiep
blackwiki>DePiep
Line 4: Line 4:
  
 
function p:test_ss()
 
function p:test_ss()
     self:preprocess_equals('{{#invoke:User:DePiep/sandbox|ss|abcdefghij|2|4|7}}', 'abcdefghij, 2, 4, 7, 10')
+
     self:preprocess_equals('{{#invoke:User:DePiep/sandbox|ss|abcdefghij|2|4|7}}', 'todo')
     --self:preprocess_equals('{{#invoke:User:DePiep/sandbox|ss|abcdefghij|2||7}}', 'bcdefg')
+
    self:preprocess_equals('{{#invoke:User:DePiep/sandbox|ss|abcdefghij|2||7}}', 'todo')
 +
 
 +
--blank
 +
    self:preprocess_equals('{{#invoke:User:DePiep/sandbox|ss||2||7}}', '<blank>')
 +
     self:preprocess_equals('{{#invoke:User:DePiep/sandbox|ss|abcdefghij|2|0|7}}', '<blank>')
 
end
 
end
  

Revision as of 13:16, 22 March 2013

Documentation for this module may be created at Module:User:DePiep/sandbox/testcases/doc

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


function p:test_ss()
    self:preprocess_equals('{{#invoke:User:DePiep/sandbox|ss|abcdefghij|2|4|7}}', 'todo')
    self:preprocess_equals('{{#invoke:User:DePiep/sandbox|ss|abcdefghij|2||7}}', 'todo')

--blank
    self:preprocess_equals('{{#invoke:User:DePiep/sandbox|ss||2||7}}', '<blank>')
    self:preprocess_equals('{{#invoke:User:DePiep/sandbox|ss|abcdefghij|2|0|7}}', '<blank>')
end

function p:test_hw()
    self:preprocess_equals('{{#invoke:User:DePiep/sandbox|hw}}', 'Hello my own world')
    self:preprocess_equals('{{#invoke:User:DePiep/sandbox|sub|abcdefghij|2||7}}', 'bcdefg')
end

return p