-- Unit tests for . Click talk page to run tests.local p = require('Module:UnitTests')
function p:test_General self:preprocess_equals('
Country: | USA |
Header Type: | hist |
', 'background:#704214; color:#fff;') self:preprocess_equals('
Country: | USA |
Header Type: | former |
', 'background:#AAA;')end
function p:test_Albania self:preprocess_equals('
Country: | ALB |
', 'background:#00408B; color:#fff;') self:preprocess_equals('
Country: | ALB |
Type: | A |
', 'background:#08842C; color:#fff;')end
function p:test_Australia self:preprocess_equals('
Country: | AUS |
Type: | freeway |
', 'background:#D2E2F9;') self:preprocess_equals('
Country: | AUS |
Type: | highway |
', 'background:#E9F9D2;') self:preprocess_equals('
Country: | AUS |
Type: | city highway |
', 'background:#E9F9D2;') self:preprocess_equals('
Country: | AUS |
Type: | road |
', 'background:#FFFFE0;') self:preprocess_equals('
Country: | AUS |
Type: | rural road |
', 'background:#FFFFE0;') self:preprocess_equals('
Country: | AUS |
Type: | street |
', 'background:#F9E2D2;') self:preprocess_equals('
Country: | AUS |
Type: | track |
', 'background:#fee8ab;') self:preprocess_equals('
Country: | AUS |
', 'background:#3A7119; color:#FFE133;')end
function p:test_Austria self:preprocess_equals('
Country: | AUT |
Type: | A |
', 'background:#276FB7; color:#fff;') self:preprocess_equals('
Country: | AUT |
', 'background:#fff; border:2px solid #000;')end
function p:test_Belgium self:preprocess_equals('
Country: | BEL |
', 'background:#005b8c; color:#fff;')end
function p:test_Bangladesh self:preprocess_equals('
Country: | BGD |
', 'background:#2C6700; color:#fff;')end
function p:test_Bulgaria self:preprocess_equals('
Country: | BGR |
Type: | A |
', 'background:#006A4D; color:#fff;') self:preprocess_equals('
Country: | BGR |
', 'background:#003F87; color:#fff;')end
function p:test_Canada self:preprocess_equals('
Country: | CAN |
Header Type: | freeway |
', 'background:#003F87; color:#fff;') self:preprocess_equals('
Country: | CAN |
Type: | Autoroute |
', 'background:#003F87; color:#fff;') self:preprocess_equals('
Country: | CAN |
Type: | TCH |
', 'background:#006A4D; color:#fff;') self:preprocess_equals('
Country: | CAN |
Type: | Hwy |
', 'background:#006A4D; color:#fff;') self:preprocess_equals('
Country: | CAN |
', 'background:#cedff2;')end
function p:test_China self:preprocess_equals('
Country: | CHN |
', 'background:#006A4D; color:#fff;')end
function p:test_Cyprus self:preprocess_equals('
Country: | CYP |
Type: | A |
', 'background:#005024; color:#FFC000;') self:preprocess_equals('
Country: | CYP |
', 'background:#003F87; color:#FFC000;')end
function p:test_CzechRepublic self:preprocess_equals('
Country: | CZE |
Type: | D |
', 'background:#006A4D; color:#fff;') self:preprocess_equals('
Country: | CZE |
', 'background:#003F87; color:#fff;')end
function p:test_Germany self:preprocess_equals('
Country: | DEU |
Type: | Autobahn |
', 'background:#003ABD; color:#fff;') self:preprocess_equals('
Country: | DEU |
Type: | B |
', 'background:#FC3;') self:preprocess_equals('
Country: | DEU |
', 'background:#cedff2;')end
function p:test_Spain self:preprocess_equals('
Country: | ESP |
Type: | AP |
', 'background:#19408B; color:#fff;') self:preprocess_equals('
Country: | ESP |
Type: | N |
', 'background:#bf0411; color:#fff;') self:preprocess_equals('
Country: | ESP |
', 'background:#E8E8E8;')end
function p:test_Europe self:preprocess_equals('
Country: | EUR |
', 'background:#08842C; color:#fff;')end
function p:test_France self:preprocess_equals('
Country: | FRA |
Type: | A |
', 'background:#0079C1; color:#fff;') self:preprocess_equals('
Country: | FRA |
Type: | N |
', 'background:#006A4D; color:#fff;') self:preprocess_equals('
Country: | FRA |
', 'background:#fff; border:2px solid #000;')end
function p:test_Martinique self:preprocess_equals('
Country: | MTQ |
Type: | A |
', 'background:#0079C1; color:#fff;') self:preprocess_equals('
Country: | MTQ |
Type: | N |
', 'background:#006A4D; color:#fff;') self:preprocess_equals('
Country: | MTQ |
', 'background:#fff; border:2px solid #000;')end
function p:test_UnitedKingdom self:preprocess_equals('
Country: | GBR |
Type: | Motorway |
', 'background:#0079C1; color:#fff;') self:preprocess_equals('
Country: | GBR |
Type: | A road |
Subtype: | minor |
', 'background:#fff; border:2px solid #000;') self:preprocess_equals('
Country: | GBR |
Type: | A |
', 'background:#00703C; color:#FFD200;') self:preprocess_equals('
Country: | GBR |
', 'background:#fff; border:2px solid #000;')end
function p:test_Georgia self:preprocess_equals('
Country: | GEO |
Type: | A |
', 'background:#039; color:#fff;') self:preprocess_equals('
Country: | GEO |
', 'background:#cedff2;')end
function p:test_Greece self:preprocess_equals('
Country: | GRC |
Type: | A |
', 'background:#006A4D; color:#fff;') self:preprocess_equals('
Country: | GRC |
', 'background:#0079C1; color:#fff;')end
function p:test_HongKong self:preprocess_equals('
Country: | HKG |
', 'background:#006A4D; color:#fff;')end
function p:test_Croatia self:preprocess_equals('
Country: | HRV |
Type: | E |
', 'background:#08842C; color:#fff;') self:preprocess_equals('
Country: | HRV |
Type: | D |
', 'background:#0066CC; color:#fff;') self:preprocess_equals('
Country: | HRV |
Type: | Z |
', 'background:#FFCC33;') self:preprocess_equals('
Country: | HRV |
', 'background:#cedff2;')end
function p:test_Hungary self:preprocess_equals('
Country: | HUN |
Type: | M |
', 'background:#0079C1; color:#fff;') self:preprocess_equals('
Country: | HUN |
', 'background:#006A4D; color:#fff;')end
function p:test_Ireland self:preprocess_equals('
Country: | IRL |
Type: | M |
', 'background:#0079C1; color:#fff;') self:preprocess_equals('
Country: | IRL |
Type: | N |
', 'background:#00703C; color:#FFD200;') self:preprocess_equals('
Country: | IRL |
Type: | R |
', 'background:#fff; border:2px solid #000;') self:preprocess_equals('
Country: | IRL |
', 'background:#cedff2;')end
function p:test_Iceland self:preprocess_equals('
Country: | ISL |
', 'background:#FFD200; border:2px solid #000;')end
function p:test_Italy self:preprocess_equals('
Country: | ITA |
Type: | A |
', 'background:#08842C; color:#fff;') self:preprocess_equals('
Country: | ITA |
Type: | SS |
', 'background:#003F87; color:#fff;') self:preprocess_equals('
Country: | ITA |
', 'background:#cedff2;')end
function p:test_Malaysia self:preprocess_equals('
Country: | MYS |
Type: | E |
', 'background:#006A4D; color:#fff;') self:preprocess_equals('
Country: | MYS |
', 'background:#0079C1; color:#fff;')end
function p:test_Netherlands self:preprocess_equals('
Country: | NLD |
', 'background:#0079C1; color:#fff;')end
function p:test_NewZealand self:preprocess_equals('
Country: | NZL |
', 'background:#006A4D; color:#fff;')end
function p:test_Slovakia self:preprocess_equals('
Country: | SVK |
Type: | D |
', 'background:#006A4D; color:#fff;') self:preprocess_equals('
Country: | SVK |
', 'background:#0079C1; color:#fff;')end
function p:test_Turkey self:preprocess_equals('
Country: | TUR |
Type: | D |
', 'background:#003F87; color:#fff;') self:preprocess_equals('
Country: | TUR |
', 'background:#006A4D; color:#fff;')end
function p:test_Ukraine self:preprocess_equals('
Country: | UKR |
', 'background:#0000cc; color:#fff;')end
function p:test_Uruguay self:preprocess_equals('
Country: | URY |
', 'background:#006A4D; color:#fff;')end
function p:test_UnitedStates self:preprocess_equals('
Country: | USA |
', 'background:#006A4D; color:#fff;') self:preprocess_equals('
Country: | USA |
Type: | Park |
', 'background:#704214; color:#fff;') self:preprocess_equals('
Country: | USA |
Type: | FFH |
', 'background:#704214; color:#fff;')end
function p:test_Vietnam self:preprocess_equals('
Country: | VNM |
', 'background:#003399; color:#fff;')end
function p:test_SouthAfrica self:preprocess_equals('
Country: | ZAF |
Type: | M |
', 'background:#0079C1; color:#fff;') self:preprocess_equals('
Country: | ZAF |
', 'background:#006A4D; color:#fff;')end
return p