Module:Coordinates/testcases
Appearance
![]() | This is the test cases page for the module Module:Coordinates. Results of the test cases. |
-- Unit tests for [[Module:Coordinates]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_coord()
self:preprocess_equals_preprocess_many('{{#invoke:Coordinates|coord|', '}}',
'{{coord|', '}}', {
{'57|18|22|N|4|27|32|W', '57|18|22|N|4|27|32|W'},
{'44.112|N|87.913|W', '44.112|N|87.913|W'},
{'44.112|-87.913', '44.112|-87.913'},
{'44.117|-87.913|dim:30_region:US-WI_type:landmark|name=Klann Road', '44.117|-87.913|dim:30_region:US-WI_type:landmark|name=Klann Road'},
{'10.2|-20.3|display=inline', '10.2|-20.3|display=inline'},
{'10.2|-20.3', '10.2|-20.3'},
{'44.4|-111.1|type:city_region:US', '44.4|-111.1|type:city_region:US'},
{'51.01234|-1.56789|type:landmark_region:GB', '51.01234|-1.56789|type:landmark_region:GB'},
{'-35.5|150.1|type:landmark_region:AU', '-35.5|150.1|type:landmark_region:AU'},
{'12|34|12|N|45|33|45|W', '12|34|12|N|45|33|45|W'},
{'43.651234|-79.383333', '43.651234|-79.383333'},
{'43.65|-79.38', '43.65|-79.38'},
{'43.6500|-79.3800', '43.6500|-79.3800'},
{'43.651234|N|79.383333|W', '43.651234|N|79.383333|W'},
{'43|29|N|79|23|W', '43|29|N|79|23|W'},
{'43|29|4|N|79|23|0|W', '43|29|4|N|79|23|0|W'},
{'43|29|4.5|N|79|23|0.5|W', '43|29|4.5|N|79|23|0.5|W'},
{'55.752222|N|37.615556|E', '55.752222|N|37.615556|E'},
{'55.752222|N|37.615556|E|format=dms', '55.752222|N|37.615556|E|format=dms'},
{'39.098095|-94.587307|format=dms', '39.098095|-94.587307|format=dms'},
{'55.752222|N|37.615556|E|format=dec|name=Moscow', '55.752222|N|37.615556|E|format=dec|name=Moscow'},
{'33|55|S|18|25|E', '33|55|S|18|25|E'},
{'35|00|N|105|00|E', '35|00|N|105|00|E'},
{'22|54|30|S|43|14|37|W', '22|54|30|S|43|14|37|W'},
{'22|S|43|W', '22|S|43|W'},
{'52|28|59|N|1|53|37|W|display=inline,title|region:GB_type:city', '52|28|59|N|1|53|37|W|display=inline,title|region:GB_type:city'},
{'46|43|N|7|58|E|type:mountain', '46|43|N|7|58|E|type:mountain'},
{'51.500611|N|0.124611|W|scale:1000', '51.500611|N|0.124611|W|scale:1000'},
{'51.500611|N|0.124611|W|scale:10000', '51.500611|N|0.124611|W|scale:10000'},
{'51.500611|N|0.124611|W|scale:100000', '51.500611|N|0.124611|W|scale:100000'},
{'51.500611|N|0.124611|W|scale:1000000', '51.500611|N|0.124611|W|scale:1000000'},
{'0|N|90|W|dim:10000000', '0|N|90|W|dim:10000000'},
{'40.5|-82.5|dim:400000', '40.5|-82.5|dim:400000'},
{'51.033|13.73|dim:20000', '51.033|13.73|dim:20000'},
{'40.6892|-74.0445|dim:100', '40.6892|-74.0445|dim:100'},
{'45.516194|-122.673226|dim:0.6', '45.516194|-122.673226|dim:0.6'},
{'46.9524|N|7.4396|E|region:CH', '46.9524|N|7.4396|E|region:CH'},
{'52.5164|N|13.3775|E|region:DE-BE', '52.5164|N|13.3775|E|region:DE-BE'},
{'0|40|26.69|N|23|28|22.69|E|globe:moon', '0|40|26.69|N|23|28|22.69|E|globe:moon'},
{'48.269|N|225.990|W|globe:mars', '48.269|N|225.990|W|globe:mars'},
{'7.5|S|303|E|globe:venus', '7.5|S|303|E|globe:venus'},
{'8|N|190.5|W|globe:mercury', '8|N|190.5|W|globe:mercury'},
{'52.5164|N|13.3775|E|region:DE-BE', '52.5164|N|13.3775|E|region:DE-BE'},
})
end
return p