Module:ConvertIB/testcases
Appearance
![]() | This is the test cases page for the module Module:ConvertIB. Results of the test cases. |
-- Unit tests for [[Module:ConvertIB]]. Click talk page to run tests.
local p = require('Module:UnitTests')
-- Example unit test.
function p:test_main()
self:preprocess_equals_preprocess('{{#invoke:ConvertIB|convert|100|m2||sqft}}', '{{Convert|100|m2|sqft|abbr=on}}')
self:preprocess_equals_preprocess('{{#invoke:ConvertIB|convert||m2|100|sqft}}', '{{Convert|100|sqft|m2|abbr=on}}')
self:preprocess_equals_preprocess('{{#invoke:ConvertIB|convert|1000|m||ft}}', '{{Convert|1000|m|ft|abbr=on}}')
self:preprocess_equals_preprocess('{{#invoke:ConvertIB|convert||m|1000|ft}}', '{{Convert|1000|m|ft|abbr=on}}')
self:preprocess_equals_preprocess('{{#invoke:ConvertIB|convert}}', '{{Convert|abbr=on}}')
end
return p