Changes

no edit summary
Line 134: Line 134:  
         for _, test in ipairs(tests) do
 
         for _, test in ipairs(tests) do
 
             local result = obj.format(nil, test)
 
             local result = obj.format(nil, test)
 +
            mw.log(fn and fn(result) or result)
 +
        end
 +
    end
 +
end
 +
 +
function Utils.registerTableTests(obj, tests, fn)
 +
    obj.run_format_tests = function()
 +
        for _, test in ipairs(tests) do
 +
            local result = obj.Table(nil, test)
 
             mw.log(fn and fn(result) or result)
 
             mw.log(fn and fn(result) or result)
 
         end
 
         end
cssedit, gkautomate
7,060

edits