Module:Infobox road/color/testcases

-- Unit tests for Module:Infobox road/color. Click talk page to run tests. local p = require('Module:UnitTests')

function p:test_General self:preprocess_equals('', 'background:#704214; color:white;') self:preprocess_equals('', 'background:#AAA;') end

function p:test_Albania self:preprocess_equals('', 'background:#00408B; color:#fff;') self:preprocess_equals('', 'background:#08842C; color:#fff;') end

function p:test_Australia self:preprocess_equals('', 'background:#D2E2F9;') self:preprocess_equals('', 'background:#E9F9D2;') self:preprocess_equals('', 'background:#FFFFE0;') self:preprocess_equals('', 'background:#F9E2D2;') self:preprocess_equals('', 'background:#3A7119; color:#FFE133;') self:preprocess_equals('', 'background:#ccc;') end

function p:test_Austria self:preprocess_equals('', 'background:#276FB7; color:#fff;') self:preprocess_equals('', 'background:#fff; border:1px solid #000;') end

function p:test_Belgium self:preprocess_equals('', 'background:#0071B3; color:#fff;') end

function p:test_Bangladesh self:preprocess_equals('', 'background:#2C6700; color:white;') end

function p:test_Bulgaria self:preprocess_equals('', 'background:#006A4D; color:white;') self:preprocess_equals('', 'background:#003F87; color:white;') end

function p:test_Canada self:preprocess_equals('', 'background:#003F87; color:white;') self:preprocess_equals('', 'background:#003F87; color:white;') self:preprocess_equals('', 'background:#006A4D; color:white;') self:preprocess_equals('', 'background:#006A4D; color:white;') self:preprocess_equals('', 'background:#cedff2;') end

function p:test_China self:preprocess_equals('', 'background:#006A4D; color:white;') end

function p:test_Cyprus self:preprocess_equals('', 'background:#005024; color:#FFC000;') self:preprocess_equals('', 'background:#003F87; color:#FFC000;') end

function p:test_CzechRepublic self:preprocess_equals('', 'background:#006A4D; color:white;') self:preprocess_equals('', 'background:#003F87; color:white;') end

function p:test_Germany self:preprocess_equals('', 'background:#039; color:#fff;') self:preprocess_equals('', 'background:#FC3; color:black') self:preprocess_equals('', 'background:#cedff2;') end

function p:test_Spain self:preprocess_equals('', 'background:#039; color:#fff;') self:preprocess_equals('', 'background:#f00; color:#fff;') self:preprocess_equals('', 'background:#E8E8E8;') end

function p:test_Europe self:preprocess_equals('', 'background:#08842C; color:#fff;') end

function p:test_France self:preprocess_equals('', 'background:#0079C1; color:#fff;') self:preprocess_equals('', 'background:#006A4D; color:#fff;') self:preprocess_equals('', 'background:#fff; border:1px solid #000;') end

function p:test_Martinique self:preprocess_equals('', 'background:#0079C1; color:#fff;') self:preprocess_equals('', 'background:#006A4D; color:#fff;') self:preprocess_equals('', 'background:#fff; border:1px solid #000;') end

function p:test_UnitedKingdom self:preprocess_equals('', 'background:#0079C1; color:#fff;') self:preprocess_equals('', 'background:#fff; border:1px solid #000;') self:preprocess_equals('', 'background:#00703C; color:#FFD200;') self:preprocess_equals('', 'background:#fff; border:1px solid #000;') end

function p:test_Georgia self:preprocess_equals('', 'background:#039; color:#fff;') self:preprocess_equals('', 'background:#cedff2;') end

function p:test_Greece self:preprocess_equals('', 'background:#006A4D; color:#FFF;') self:preprocess_equals('', 'background:#0079C1; color:#FFF;') end

function p:test_HongKong self:preprocess_equals('', 'background:#006A4D; color:#fff;') end

function p:test_Croatia self:preprocess_equals('', 'background:#08842C; color:#fff;') self:preprocess_equals('', 'background:#0066CC; color:#fff;') self:preprocess_equals('', 'background:#FFCC33; color:black;') self:preprocess_equals('', 'background:#cedff2;') end

function p:test_Hungary self:preprocess_equals('', 'background:#0079C1; color:#fff;') self:preprocess_equals('', 'background:#006A4D; color:#fff;') end

function p:test_Ireland self:preprocess_equals('', 'background:#0079C1; color:#fff;') self:preprocess_equals('', 'background:#00703C; color:#FFD200;') self:preprocess_equals('', 'background:#fff; border:1px solid #000;') self:preprocess_equals('', 'background:#cedff2;') end

function p:test_Iceland self:preprocess_equals('', 'background:#FFD200; border:1px solid #000;') end

function p:test_Italy self:preprocess_equals('', 'background:#08842C; color:#fff;') self:preprocess_equals('', 'background:#003F87; color:#fff;') self:preprocess_equals('', 'background:#cedff2;') end

function p:test_Malaysia self:preprocess_equals('', 'background:#006A4D; color:#fff;') self:preprocess_equals('', 'background:#0079C1; color:#fff;') end

function p:test_Netherlands self:preprocess_equals('', 'background:#0079C1; color:#fff;') end

function p:test_NewZealand self:preprocess_equals('', 'background:#006A4D; color:#fff;') end

function p:test_Slovakia self:preprocess_equals('', 'background:#006A4D; color:#fff;') self:preprocess_equals('', 'background:#0079C1; color:#fff;') end

function p:test_Turkey self:preprocess_equals('', 'background:#003F87; color:#fff;') self:preprocess_equals('', 'background:#006A4D; color:#fff;') end

function p:test_Ukraine self:preprocess_equals('', 'background:#003F87; color:white;') end

function p:test_Uruguay self:preprocess_equals('', 'background:#006A4D; color:white;') end

function p:test_UnitedStates self:preprocess_equals('', 'background:#006A4D; color:white;') self:preprocess_equals('', 'background:#704214; color:white;') self:preprocess_equals('', 'background:#704214; color:white;') end

function p:test_Vietnam self:preprocess_equals('', 'background:#003399; color:white;') end

function p:test_SouthAfrica self:preprocess_equals('', 'background:#0079C1; color:#FFF;') self:preprocess_equals('', 'background:#006A4D; color:#FFF;') end

return p