Module:Infobox road/abbrev/USA/testcases

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

function p:test_Interstates self:preprocess_equals('', 'I-5') self:preprocess_equals('', 'H-3') self:preprocess_equals('', 'PRI-1') end

function p:test_Future self:preprocess_equals('', 'Future I-11') end

function p:test_USHighways self:preprocess_equals('', 'US 6') self:preprocess_equals('', 'US-6') end

function p:test_NERoutes self:preprocess_equals('', 'Route 1') end

function p:test_StateRoutes self:preprocess_equals('', 'SR-1') self:preprocess_equals('', 'AK-1') self:preprocess_equals('', 'SR 77') self:preprocess_equals('', 'Hwy. 1') self:preprocess_equals('', 'SR 1') self:preprocess_equals('', 'SH 77') self:preprocess_equals('', 'Route 9') self:preprocess_equals('', 'DE 1') self:preprocess_equals('', 'DC 295') self:preprocess_equals('', 'SR A1A') self:preprocess_equals('', 'SR 1') self:preprocess_equals('', 'GH-1') self:preprocess_equals('', 'Route 61') self:preprocess_equals('', 'SH-1') self:preprocess_equals('', 'IL 47') self:preprocess_equals('', 'SR 1') self:preprocess_equals('', 'Iowa 1') self:preprocess_equals('', 'K-4') self:preprocess_equals('', 'KY 10') self:preprocess_equals('', 'LA 1') self:preprocess_equals('', 'SR 1') self:preprocess_equals('', 'MD 1') self:preprocess_equals('', 'Route 3') self:preprocess_equals('', 'M-15') self:preprocess_equals('', 'MN 1') self:preprocess_equals('', 'MS 1') self:preprocess_equals('', 'Route 30') self:preprocess_equals('', 'MT 200') self:preprocess_equals('', 'N-1') self:preprocess_equals('', 'SR 407') self:preprocess_equals('', 'NH 1') self:preprocess_equals('', 'Route 10') self:preprocess_equals('', 'NM 1') self:preprocess_equals('', 'NY 9') self:preprocess_equals('', 'NY 9 (E)') self:preprocess_equals('', 'NC 1') self:preprocess_equals('', 'ND 1') self:preprocess_equals('', 'SR 1') self:preprocess_equals('', 'SH-10') self:preprocess_equals('', 'OR 99') self:preprocess_equals('', 'PA 1') self:preprocess_equals('', 'PR-10') self:preprocess_equals('', 'Route 1') self:preprocess_equals('', 'SC 1') self:preprocess_equals('', 'SD 1') self:preprocess_equals('', 'SR-1') self:preprocess_equals('', 'SH 211') self:preprocess_equals('', 'SR-1') self:preprocess_equals('', 'SR-281 to SR-320') self:preprocess_equals('', 'VT 1') self:preprocess_equals('', 'Highway 1') self:preprocess_equals('', 'SR 1') self:preprocess_equals('', 'SR 500') self:preprocess_equals('', 'WV 1') self:preprocess_equals('', 'WIS 120') self:preprocess_equals('', 'WYO 20') end

function p:test_Former self:preprocess_equals('', 'ex-SR 1') self:preprocess_equals('', 'ex-SR 1') end

function p:test_Secondary self:preprocess_equals('', 'SR-12') self:preprocess_equals('', 'SR-12') self:preprocess_equals('', 'SR 852') end

function p:test_County self:preprocess_equals('', 'CR-20') self:preprocess_equals('', 'CR-20') self:preprocess_equals('', 'PR 20') self:preprocess_equals('', 'CR S17') end

function p:test_CDH self:preprocess_equals('', '200') end

function p:test_E self:preprocess_equals('', 'E-470') end

function p:test_Forest self:preprocess_equals('', 'F.H. 9') self:preprocess_equals('', 'FFH 9') self:preprocess_equals('', 'FH 9') end

function p:test_Toll self:preprocess_equals('', 'SR 529') self:preprocess_equals('', 'PA 100') self:preprocess_equals('', 'Loop 1') self:preprocess_equals('', '183A') self:preprocess_equals('', 'SH 130') end

function p:test_LA1924 self:preprocess_equals('', 'SR 2') end

function p:test_FarmToMarket self:preprocess_equals('', 'FM 1957') self:preprocess_equals('', 'FM 471') end

function p:test_Link self:preprocess_equals('', 'L-28B') end

function p:test_Loop self:preprocess_equals('', 'Loop 1604') end

function p:test_PSH self:preprocess_equals('', 'PSH 1') end

function p:test_SSH self:preprocess_equals('', 'SSH 1') end

function p:test_Park self:preprocess_equals('', 'PR 30') end

function p:test_Parkway self:preprocess_equals('', 'Bluegrass Parkway') end

function p:test_RanchToMarket self:preprocess_equals('', 'RM 1') self:preprocess_equals('', 'RM 620') end

function p:test_Recreational self:preprocess_equals('', 'RE 255') self:preprocess_equals('', 'R-2') end

function p:test_Spur self:preprocess_equals('', 'Spur 422') self:preprocess_equals('', 'S-2') end

return p