Module:Format price/testcases

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

-- Example unit test. function p:test_main self:preprocess_equals('', '123,500') self:preprocess_equals('', '123,460') self:preprocess_equals('', '123,457') self:preprocess_equals('', '123,457') self:preprocess_equals('', '123,457') self:preprocess_equals('', '0') self:preprocess_equals('', '10') self:preprocess_equals('', '13') self:preprocess_equals('', '13') self:preprocess_equals('', '12.78') self:preprocess_equals('', '1.23\194\160million') self:preprocess_equals('', '12.3\194\160million') self:preprocess_equals('', '123\194\160million') self:preprocess_equals('', '1.23\194\160billion') self:preprocess_equals('', '12.3\194\160billion') self:preprocess_equals('', '123\194\160billion') self:preprocess_equals('', '1.23\194\160trillion') end

return p