text: # -*- coding: utf-8 -*-
  #*_*#
  import unittest
  
  from probe import extract
  from ololo import PRIORITY_PROPERTIES
  
  TESTS = (
    ##("Positioning", (
      ("po", ("position", "")),
      ("pos", ("position", "static")),
      ("poa", ("position", "absolute")),
      ("por", ("position", "relative")),
      ("pof", ("position", "fixed")),
    
      ("t", ("top", "")),
      ("ta", ("top", "auto")),
    
      ("r", ("right", "")),
      ("ra", ("right", "auto")),
    
      ("b", ("bottom", "")),
      ("ba", ("bottom", "auto")),
    
      ("l", ("left", "")),
      ("la", ("left", "auto")),
    
      ("zi", ("z-index", "")),
      ("zia", ("z-index", "auto")),
    #)),
    
    ##("Positioning (Zen CSS)", (
      ("pos:", ("position", "")),
      ("pos:s", ("position", "static")),
      ("pos:a", ("position", "absolute")),
      ("pos:r", ("position", "relative")),
      ("pos:f", ("position", "fixed")),
    
      ("t:", ("top", "")),
      ("t:a", ("top", "auto")),
    
      ("r:", ("right", "")),
      ("r:a", ("right", "auto")),
    
      ("b:", ("bottom", "")),
      ("b:a", ("bottom", "auto")),
    
      ("l:", ("left", "")),
      ("l:a", ("left", "auto")),
    
      ("z:", ("z-index", "")),
      ("z:a", ("z-index", "auto")),
    #)),
    
    #("Block", (
      # ("f", ("float", "")), # not needed, abbr replaces with font
      ("fn", ("float", "none")),
      ("fln", ("float", "none")),
      ("fl", ("float", "left")),
      ("fll", ("float", "left")),
      ("fr", ("float", "right")),
      ("flr", ("float", "right")),
      # ("c", ("clear", "")), # not needed, abbr replaces with color
      ("cn", ("clear", "none")),
      ("cl", ("clear", "left")),
      ("cll", ("clear", "left")),
      ("cr", ("clear", "right")),
      ("clr", ("clear", "right")),
      ("cb", ("clear", "both")),
      ("clb", ("clear", "both")),
      ("d", ("display", "")),
      ("dn", ("display", "none")),
      ("di", ("display", "inline")),
      ("db", ("display", "block")),
      ("dib", ("display", "inline-block")),
      ("dli", ("display", "list-item")),
      ("dri", ("display", "run-in")),
      ("dc", ("display", "compact")),
      ("df", ("display", "flexbox")),
      ("dif", ("display", "inline-flexbox")),
      ("dit", ("display", "inline-table")),
      ("dtc", ("display", "table-cell")),
      ("dtca", ("display", "table-caption")),
      ("dtco", ("display", "table-column")),
      ("dtcg", ("display", "table-column-group")),
      ("dthg", ("display", "table-header-group")),
      ("dtfg", ("display", "table-footer-group")),
      ("dtr", ("display", "table-row")),
      ("dtrg", ("display", "table-row-group")),
      ("v", ("visibility", "")),
      ("vv", ("visibility", "visible")),
      ("vh", ("visibility", "hidden")),
      ("vc", ("visibility", "collapse")),
      ("o", ("overflow", "")),
      ("ov", ("overflow", "visible")),
      ("oh", ("overflow", "hidden")),
      ("os", ("overflow", "scroll")),
      ("oa", ("overflow", "auto")),
      ("ox", ("overflow-x", "")),
      ("oxv", ("overflow-x", "visible")),
      ("oxh", ("overflow-x", "hidden")),
      ("oxs", ("overflow-x", "scroll")),
      ("oxa", ("overflow-x", "auto")),
      ("oy", ("overflow-y", "")),
      ("oyv", ("overflow-y", "visible")),
      ("oyh", ("overflow-y", "hidden")),
      ("oys", ("overflow-y", "scroll")),
      ("oya", ("overflow-y", "auto")),
      ("clp", ("clip", "")), # no shorter
      ("clpa", ("clip", "auto")),
      # ("bxs", ("box-sizing", "")), # Box-shadow is more popular than box-sizing
      ("bxscb", ("box-sizing", "content-box")),
      ("bxsbb", ("box-sizing", "border-box")),
      ("fd", ("flex-direction", "")),
      ("fdl", ("flex-direction", "lr")),
      ("fdr", ("flex-direction", "rl")),
      ("fdt", ("flex-direction", "tb")),
      ("fdb", ("flex-direction", "bt")),
      ("fdi", ("flex-direction", "inline")),
      ("fdir", ("flex-direction", "inline-reverse")),
      ("fdbl", ("flex-direction", "block")),
      ("fdbr", ("flex-direction", "block-reverse")),
      ("fo", ("flex-order", "")),
      ("fp", ("flex-pack", "")),
      ("fps", ("flex-pack", "start")),
      ("fpe", ("flex-pack", "end")),
      ("fpc", ("flex-pack", "center")),
      ("fpj", ("flex-pack", "justify")),
      ("fa", ("flex-align", "")),
      ("faa", ("flex-align", "auto")),
      ("fab", ("flex-align", "baseline")),
    #)),
    #("Block (Zen CSS)", (
      ("fl:", ("float", "")),
      ("fl:n", ("float", "none")),
      ("fl:l", ("float", "left")),
      ("fl:r", ("float", "right")),
      ("cl:", ("clear", "")),
      ("cl:n", ("clear", "none")),
      ("cl:l", ("clear", "left")),
      ("cl:r", ("clear", "right")),
      ("cl:b", ("clear", "both")),
      ("d:", ("display", "")),
      ("d:n", ("display", "none")),
      ("d:i", ("display", "inline")),
      ("d:b", ("display", "block")),
      ("d:ib", ("display", "inline-block")),
      ("d:li", ("display", "list-item")),
      ("d:ri", ("display", "run-in")),
      ("d:c", ("display", "compact")),
      ("d:f", ("display", "flexbox")),
      ("d:if", ("display", "inline-flexbox")),
      ("d:it", ("display", "inline-table")),
      ("d:tca", ("display", "table-caption")),
      ("d:tco", ("display", "table-column")),
      ("d:tcg", ("display", "table-column-group")),
      ("d:thg", ("display", "table-header-group")),
      ("d:tfg", ("display", "table-footer-group")),
      ("d:tr", ("display", "table-row")),
      ("d:trg", ("display", "table-row-group")),
      ("d:tc", ("display", "table-cell")),
      ("v:", ("visibility", "")),
      ("v:v", ("visibility", "visible")),
      ("v:h", ("visibility", "hidden")),
      ("v:c", ("visibility", "collapse")),
      ("ov:", ("overflow", "")),
      ("ov:v", ("overflow", "visible")),
      ("ov:h", ("overflow", "hidden")),
      ("ov:s", ("overflow", "scroll")),
      ("ov:a", ("overflow", "auto")),
      ("ovx:", ("overflow-x", "")),
      ("ovx:v", ("overflow-x", "visible")),
      ("ovx:h", ("overflow-x", "hidden")),
      ("ovx:s", ("overflow-x", "scroll")),
      ("ovx:a", ("overflow-x", "auto")),
      ("ovy:", ("overflow-y", "")),
      ("ovy:v", ("overflow-y", "visible")),
      ("ovy:h", ("overflow-y", "hidden")),
      ("ovy:s", ("overflow-y", "scroll")),
      ("ovy:a", ("overflow-y", "auto")),
      ("cp:", ("clip", "")),
      ("cp:a", ("clip", "auto")),
      ("bs:", ("box-sizing", "")),
      ("bs:cb", ("box-sizing", "content-box")),
      ("bs:bb", ("box-sizing", "border-box")),
      ("fxd:", ("flex-direction", "")),
      ("fxd:lr", ("flex-direction", "lr")),
      ("fxd:rl", ("flex-direction", "rl")),
      ("fxd:tb", ("flex-direction", "tb")),
      ("fxd:bt", ("flex-direction", "bt")),
      ("fxd:i", ("flex-direction", "inline")),
      ("fxd:ir", ("flex-direction", "inline-reverse")),
      ("fxd:b", ("flex-direction", "block")),
      ("fxd:br", ("flex-direction", "block-reverse")),
      ("fxo:", ("flex-order", "")),
      ("fxp:", ("flex-pack", "")),
      ("fxp:s", ("flex-pack", "start")),
      ("fxp:e", ("flex-pack", "end")),
      ("fxp:c", ("flex-pack", "center")),
      ("fxp:j", ("flex-pack", "justify")),
      ("fxa:", ("flex-align", "")),
      ("fxa:a", ("flex-align", "auto")),
      ("fxa:b", ("flex-align", "baseline")),
    #)),
    
    #("Sizing", (
      ("m", ("margin", "")),
      ("ma", ("margin", "auto")),
      ("mt", ("margin-top", "")),
      ("mta", ("margin-top", "auto")),
      ("mr", ("margin-right", "")),
      ("mra", ("margin-right", "auto")),
      ("mb", ("margin-bottom", "")),
      ("mba", ("margin-bottom", "auto")),
      ("ml", ("margin-left", "")),
      ("mla", ("margin-left", "auto")),
      ("p", ("padding", "")),
      ("pt", ("padding-top", "")),
      ("pr", ("padding-right", "")),
      ("pb", ("padding-bottom", "")),
      ("pl", ("padding-left", "")),
      # mw/mh — min or max? What is better?
      ("miw", ("min-width", "")),
      ("mih", ("min-height", "")),
      ("maw", ("max-width", "")),
      ("mawn", ("max-width", "none")),
      ("mah", ("max-height", "")),
      ("mahn", ("max-height", "none")),
      ("w", ("width", "")),
      ("wa", ("width", "auto")),
      ("h", ("height", "")),
      ("ha", ("height", "auto")),
    #)),
    #("Sizing (Zen CSS)", (
      ("m:", ("margin", "")),
      ("m:a", ("margin", "auto")),
      ("mt:", ("margin-top", "")),
      ("mt:a", ("margin-top", "auto")),
      ("mr:", ("margin-right", "")),
      ("mr:a", ("margin-right", "auto")),
      ("mb:", ("margin-bottom", "")),
      ("mb:a", ("margin-bottom", "auto")),
      ("ml:", ("margin-left", "")),
      ("ml:a", ("margin-left", "auto")),
      ("p:", ("padding", "")),
      ("pt:", ("padding-top", "")),
      ("pr:", ("padding-right", "")),
      ("pb:", ("padding-bottom", "")),
      ("pl:", ("padding-left", "")),
      ("miw:", ("min-width", "")),
      ("mih:", ("min-height", "")),
      ("maw:", ("max-width", "")),
      ("maw:n", ("max-width", "none")),
      ("mah:", ("max-height", "")),
      ("mah:n", ("max-height", "none")),
      ("w:", ("width", "")),
      ("w:a", ("width", "auto")),
      ("h:", ("height", "")),
      ("h:a", ("height", "auto")),
    #)),
    
    #("Colors", (
      ("ou", ("outline", "")),
      ("oun", ("outline", "none")),
      ("ouw:", ("outline-width", "")),
      ("ous:", ("outline-style", "")),
      ("ousn", ("outline-style", "none")),
      ("ouc:", ("outline-color", "")),
      ("ouci", ("outline-color", "invert")),
      ("ouo:", ("outline-offset", "")),
      ("bo", ("border", "")),
      ("bon", ("border", "none")),
      ("bocl", ("border-collapse", "")),
      ("boclc", ("border-collapse", "collapse")),
      ("bocls", ("border-collapse", "separate")),
      ("bow", ("border-width", "")),
      ("bos", ("border-style", "")),
      ("bsn", ("border-style", "none")),
      ("bsh", ("border-style", "hidden")),
      ("bsd", ("border-style", "dotted")),
      ("bsda", ("border-style", "dashed")),
      ("bss", ("border-style", "solid")),
      ("bsdb", ("border-style", "double")),
      ("bsg", ("border-style", "groove")),
      ("bsr", ("border-style", "ridge")),
      ("bsi", ("border-style", "inset")),
      ("bso", ("border-style", "outset")),
      ("bc", ("border-color", "")),
      ("bt", ("border-top", "")),
      ("btn", ("border-top", "none")),
      ("btw", ("border-top-width", "")),
      ("bts", ("border-top-style", "")),
      ("btsn", ("border-top-style", "none")),
      ("btc", ("border-top-color", "")),
      ("br", ("border-right", "")),
      ("brn", ("border-right", "none")),
      ("brw", ("border-right-width", "")),
      ("brs", ("border-right-style", "")),
      ("brsn", ("border-right-style", "none")),
      ("brc", ("border-right-color", "")),
      ("bb", ("border-bottom", "")),
      ("bbn", ("border-bottom", "none")),
      ("bbw", ("border-bottom-width", "")),
      ("bbs", ("border-bottom-style", "")),
      ("bbsn", ("border-bottom-style", "none")),
      ("bbc", ("border-bottom-color", "")),
      ("bl", ("border-left", "")),
      ("bln", ("border-left", "none")),
      ("blw", ("border-left-width", "")),
      ("bls", ("border-left-style", "")),
      ("blsn", ("border-left-style", "none")),
      ("blc", ("border-left-color", "")),
      ("ba", ("background", "")),
      ("ban", ("background", "none")),
      ("bac", ("background-color", "")),
      ("bact", ("background-color", "transparent")),
      ("bai", ("background-image", "")),
      ("bain", ("background-image", "none")),
      ("bar", ("background-repeat", "")),
      ("barr", ("background-repeat", "repeat")),
      ("barx", ("background-repeat", "repeat-x")),
      ("bary", ("background-repeat", "repeat-y")),
      ("bars", ("background-repeat", "space")),
      ("barro", ("background-repeat", "round")),
      ("barn", ("background-repeat", "no-repeat")),
      ("baa", ("background-attachment", "")),
      ("baaf", ("background-attachment", "fixed")),
      ("baal", ("background-attachment", "local")),
      ("baas", ("background-attachment", "scroll")),
      ("bap", ("background-position", "")),
      ("bapx", ("background-position-x", "")),
      ("bapy", ("background-position-y", "")),
      ("bacl", ("background-clip", "")),
      ("baclb", ("background-clip", "border-box")),
      ("baclp", ("background-clip", "padding-box")),
      ("baclc", ("background-clip", "content-box")),
      ("bao", ("background-origin", "")),
      ("baop", ("background-origin", "padding-box")),
      ("baob", ("background-origin", "border-box")),
      ("baoc", ("background-origin", "content-box")),
      ("basi", ("background-size", "")),
      ("basia", ("background-size", "auto")),
      ("basic", ("background-size", "contain")),
      ("basico", ("background-size", "cover")),
      ("bxdb", ("box-decoration-break", "")),
      ("bxdbs", ("box-decoration-break", "slice")),
      ("bxdbc", ("box-decoration-break", "clone")),
      ("c", ("color", "")),
      ("c:f", ("color", "#FFF")),
    #)),
    #("Colors (Zen CSS)", (
      # ("o:", ("outline", "")), # overflow is more popular
      ("o:n", ("outline", "none")),
      ("ow:", ("outline-width", "")),
      ("os:", ("outline-style", "")),
      ("os:n", ("outline-style", "none")),
      ("oc:", ("outline-color", "")),
      ("oc:i", ("outline-color", "invert")),
      ("oo:", ("outline-offset", "")),
      ("bd:", ("border", "")),
      ("bd:n", ("border", "none")),
      ("bdcl:", ("border-collapse", "")),
      ("bdcl:c", ("border-collapse", "collapse")),
      ("bdcl:s", ("border-collapse", "separate")),
      ("bdw:", ("border-width", "")),
      ("bds:", ("border-style", "")),
      ("bds:n", ("border-style", "none")),
      ("bds:h", ("border-style", "hidden")),
      ("bds:dt", ("border-style", "dotted")),
      ("bds:ds", ("border-style", "dashed")),
      ("bds:s", ("border-style", "solid")),
      ("bds:db", ("border-style", "double")),
      ("bds:g", ("border-style", "groove")),
      ("bds:r", ("border-style", "ridge")),
      ("bds:i", ("border-style", "inset")),
      ("bds:o", ("border-style", "outset")),
      ("bdc:", ("border-color", "")),
      ("bdt:", ("border-top", "")),
      ("bdt:n", ("border-top", "none")),
      ("bdtw:", ("border-top-width", "")),
      ("bdts:", ("border-top-style", "")),
      ("bdts:n", ("border-top-style", "none")),
      ("bdtc:", ("border-top-color", "")),
      ("bdr:", ("border-right", "")),
      ("bdr:n", ("border-right", "none")),
      ("bdrw:", ("border-right-width", "")),
      ("bdrs:", ("border-right-style", "")),
      ("bdrs:n", ("border-right-style", "none")),
      ("bdrc:", ("border-right-color", "")),
      ("bdb:", ("border-bottom", "")),
      ("bdb:n", ("border-bottom", "none")),
      ("bdbw:", ("border-bottom-width", "")),
      ("bdbs:", ("border-bottom-style", "")),
      ("bdbs:n", ("border-bottom-style", "none")),
      ("bdbc:", ("border-bottom-color", "")),
      ("bdl:", ("border-left", "")),
      ("bdl:n", ("border-left", "none")),
      ("bdlw:", ("border-left-width", "")),
      ("bdls:", ("border-left-style", "")),
      ("bdls:n", ("border-left-style", "none")),
      ("bdlc:", ("border-left-color", "")),
      ("bg:", ("background", "")),
      ("bg:n", ("background", "none")),
      ("bgc:", ("background-color", "")),
      ("bgc:t", ("background-color", "transparent")),
      ("bgi:", ("background-image", "")),
      ("bgi:n", ("background-image", "none")),
      ("bgr:", ("background-repeat", "")),
      ("bgr:r", ("background-repeat", "repeat")),
      ("bgr:x", ("background-repeat", "repeat-x")),
      ("bgr:y", ("background-repeat", "repeat-y")),
      ("bgr:sp", ("background-repeat", "space")),
      ("bgr:ro", ("background-repeat", "round")),
      ("bgr:n", ("background-repeat", "no-repeat")),
      ("bga:", ("background-attachment", "")),
      ("bga:f", ("background-attachment", "fixed")),
      ("bga:l", ("background-attachment", "local")),
      ("bga:s", ("background-attachment", "scroll")),
      ("bgp:", ("background-position", "")),
      ("bgpx:", ("background-position-x", "")),
      ("bgpy:", ("background-position-y", "")),
      ("bgcp:", ("background-clip", "")),
      ("bgcp:bb", ("background-clip", "border-box")),
      ("bgcp:pb", ("background-clip", "padding-box")),
      ("bgcp:cb", ("background-clip", "content-box")),
      ("bgo:", ("background-origin", "")),
      ("bgo:pb", ("background-origin", "padding-box")),
      ("bgo:bb", ("background-origin", "border-box")),
      ("bgo:cb", ("background-origin", "content-box")),
      ("bgz:", ("background-size", "")),
      ("bgz:a", ("background-size", "auto")),
      ("bgz:con", ("background-size", "contain")),
      ("bgz:cov", ("background-size", "cover")),
      ("bdbr:", ("box-decoration-break", "")),
      ("bdbr:s", ("box-decoration-break", "slice")),
      ("bdbr:c", ("box-decoration-break", "clone")),
      ("c:", ("color", "")),
    #)),
    
    #("Content", (
      ("tl", ("table-layout", "")),
      ("tla", ("table-layout", "auto")),
      ("tlf", ("table-layout", "fixed")),
      ("cs", ("caption-side", "")),
      ("cst", ("caption-side", "top")),
      ("csb", ("caption-side", "bottom")),
      ("ec", ("empty-cells", "")),
      ("ecs", ("empty-cells", "show")),
      ("ech", ("empty-cells", "hide")),
      ("ls", ("list-style", "")),
      ("lsn", ("list-style", "none")),
      ("lsp", ("list-style-position", "")),
      ("lspi", ("list-style-position", "inside")),
      ("lspo", ("list-style-position", "outside")),
      ("lst", ("list-style-type", "")),
      ("lstn", ("list-style-type", "none")),
      ("lstd", ("list-style-type", "disc")),
      ("lstc", ("list-style-type", "circle")),
      ("lsts", ("list-style-type", "square")),
      ("lstde", ("list-style-type", "decimal")),
      ("lstdlz", ("list-style-type", "decimal-leading-zero")),
      ("lstl", ("list-style-type", "lower-roman")),
      ("lstu", ("list-style-type", "upper-roman")),
      ("lsi", ("list-style-image", "")),
      ("lsin", ("list-style-image", "none")),
      ("q", ("quotes", "")),
      ("qn", ("quotes", "none")),
      ("ct", ("content", "")),
      ("ctn", ("content", "normal")),
      ("con", ("content", "normal")),
      ("ctoq", ("content", "open-quote")),
      ("conoq", ("content", "open-quote")),
      ("ctnoq", ("content", "no-open-quote")),
      ("ctcq", ("content", "close-quote")),
      ("ctncq", ("content", "no-close-quote")),
      ("cti", ("content", "icon")),
      ("coui", ("counter-increment", "")),
      ("cour", ("counter-reset", "")),
    #)),
    #("Content (Zen CSS)", (
      ("tl:", ("table-layout", "")),
      ("tl:a", ("table-layout", "auto")),
      ("tl:f", ("table-layout", "fixed")),
      ("cs:", ("caption-side", "")),
      ("cs:t", ("caption-side", "top")),
      ("cs:b", ("caption-side", "bottom")),
      ("ec:", ("empty-cells", "")),
      ("ec:s", ("empty-cells", "show")),
      ("ec:h", ("empty-cells", "hide")),
      ("ls:", ("list-style", "")),
      ("ls:n", ("list-style", "none")),
      ("lsp:", ("list-style-position", "")),
      ("lsp:i", ("list-style-position", "inside")),
      ("lsp:o", ("list-style-position", "outside")),
      ("lst:", ("list-style-type", "")),
      ("lst:n", ("list-style-type", "none")),
      ("lst:d", ("list-style-type", "disc")),
      ("lst:c", ("list-style-type", "circle")),
      ("lst:s", ("list-style-type", "square")),
      ("lst:dc", ("list-style-type", "decimal")),
      ("lst:dclz", ("list-style-type", "decimal-leading-zero")),
      ("lst:lr", ("list-style-type", "lower-roman")),
      ("lst:ur", ("list-style-type", "upper-roman")),
      ("lsi:", ("list-style-image", "")),
      ("lsi:n", ("list-style-image", "none")),
      ("q:", ("quotes", "")),
      ("q:n", ("quotes", "none")),
      ("ct:", ("content", "")),
      ("ct:n", ("content", "normal")),
      ("ct:oq", ("content", "open-quote")),
      ("ct:noq", ("content", "no-open-quote")),
      ("ct:cq", ("content", "close-quote")),
      ("ct:ncq", ("content", "no-close-quote")),
      ("ct:i", ("content", "icon")),
      ("coi:", ("counter-increment", "")),
      ("cor:", ("counter-reset", "")),
    #)),
    
    #("Sizing", (
      ("mswm", ("-ms-writing-mode", "")),
      ("va", ("vertical-align", "")),
      ("vas", ("vertical-align", "sub")),
      ("vasp", ("vertical-align", "super")),
      ("vat", ("vertical-align", "top")),
      ("vatt", ("vertical-align", "text-top")),
      ("vam", ("vertical-align", "middle")),
      ("vab", ("vertical-align", "bottom")),
      ("vaba", ("vertical-align", "baseline")),
      ("vatb", ("vertical-align", "text-bottom")),
      ("ta", ("text-align", "")),
      ("tal", ("text-align", "left")),
      ("tac", ("text-align", "center")),
      ("tar", ("text-align", "right")),
      ("taj", ("text-align", "justify")),
      ("tas", ("text-align", "start")),
      ("tae", ("text-align", "end")),
      ("tal", ("text-align-last", "")),
      ("tala", ("text-align-last", "auto")),
      ("tall", ("text-align-last", "left")),
      ("talc", ("text-align-last", "center")),
      ("talr", ("text-align-last", "right")),
      ("talj", ("text-align-last", "justify")),
      ("td", ("text-decoration", "")),
      ("tdn", ("text-decoration", "none")),
      ("tdo", ("text-decoration", "overline")),
      ("tdl", ("text-decoration", "line-through")),
      ("tdu", ("text-decoration", "underline")),
      ("te", ("text-emphasis", "")),
      ("tec", ("text-emphasis-color", "")),
      ("tes", ("text-emphasis-style", "")),
      ("tep", ("text-emphasis-position", "")),
      ("ti", ("text-indent", "")),
      ("tie", ("text-indent", "each-line")),
      ("tih", ("text-indent", "hanging")),
      ("tj", ("text-justify", "")),
      ("tja", ("text-justify", "auto")),
      ("tjiw", ("text-justify", "inter-word")),
      ("tjii", ("text-justify", "inter-ideograph")),
      ("tjic", ("text-justify", "inter-cluster")),
      ("tjd", ("text-justify", "distribute")),
      ("tjdal", ("text-justify", "distribute-all-lines")),
      ("tjdcl", ("text-justify", "distribute-center-last")),
      ("tjk", ("text-justify", "kashida")),
      ("tjn", ("text-justify", "newspaper")),
      ("tjt", ("text-justify", "tibetan")),
      # ("to", ("text-outline", "")), # text-overflow is more popular
      ("ton", ("text-outline", "none")),
      ("tt", ("text-transform", "")),
      ("ttn", ("text-transform", "none")),
      ("ttc", ("text-transform", "capitalize")),
      ("ttu", ("text-transform", "uppercase")),
      ("ttl", ("text-transform", "lowercase")),
      ("ttf", ("text-transform", "fullwidth")),
      ("tw", ("text-wrap", "")),
      ("twn", ("text-wrap", "none")),
      ("twno", ("text-wrap", "normal")),
      ("twu", ("text-wrap", "unrestricted")),
      ("twa", ("text-wrap", "avoid")),
      ("tov", ("text-overflow", "")),
      ("toe", ("text-overflow", "ellipsis")),
      ("tom", ("text-overflow-mode", "")),
      ("tomc", ("text-overflow-mode", "clip")),
      ("tome", ("text-overflow-mode", "ellipsis")),
      ("tomew", ("text-overflow-mode", "ellipsis-word")),
      ("tsh", ("text-shadow", "")),
      ("tshn", ("text-shadow", "none")),
      ("lh", ("line-height", "")),
      ("lhn", ("line-height", "normal")),
      ("ws", ("white-space", "")),
      ("wsn", ("white-space", "nowrap")),
      ("wsno", ("white-space", "normal")),
      ("wsp", ("white-space", "pre")),
      ("wspw", ("white-space", "pre-wrap")),
      ("wspl", ("white-space", "pre-line")),
      ("wos", ("word-spacing", "")),
      ("wosn", ("word-spacing", "normal")),
      ("wow", ("word-wrap", "")),
      ("wown", ("word-wrap", "normal")),
      ("wowbw", ("word-wrap", "break-word")),
      ("wob:", ("word-break", "")),
      ("les", ("letter-spacing", "")),
      ("lesn", ("letter-spacing", "normal")),
      ("f", ("font", "")),
      ("fw", ("font-weight", "")),
      ("fwn", ("font-weight", "normal")),
      ("fwb", ("font-weight", "bold")),
      ("fwbr", ("font-weight", "bolder")),
      ("fwl", ("font-weight", "lighter")),
      ("fw1", ("font-weight", "100")),
      ("fw2", ("font-weight", "200")),
      ("fw3", ("font-weight", "300")),
      ("fw4", ("font-weight", "400")),
      ("fw5", ("font-weight", "500")),
      ("fw6", ("font-weight", "600")),
      ("fw7", ("font-weight", "700")),
      ("fw8", ("font-weight", "800")),
      ("fw9", ("font-weight", "900")),
      ("fst", ("font-style", "")),
      ("fstn", ("font-style", "normal")),
      ("fsti", ("font-style", "italic")),
      ("fsto", ("font-style", "oblique")),
      ("fv", ("font-variant", "")),
      ("fvn", ("font-variant", "normal")),
      ("fvs", ("font-variant", "small-caps")),
      ("fsa", ("font-size-adjust", "")),
      ("fsan", ("font-size-adjust", "none")),
      ("fstr", ("font-stretch", "")),
      ("fstrn", ("font-stretch", "normal")),
      ("fstruc", ("font-stretch", "ultra-condensed")),
      ("fstrec", ("font-stretch", "extra-condensed")),
      ("fstrc", ("font-stretch", "condensed")),
      ("fstrsc", ("font-stretch", "semi-condensed")),
      ("fstrse", ("font-stretch", "semi-expanded")),
      ("fstre", ("font-stretch", "expanded")),
      ("fstree", ("font-stretch", "extra-expanded")),
      ("fstrue", ("font-stretch", "ultra-expanded")),
      ("fs", ("font-size", "")),
      ("ff", ("font-family", "")),
      ("ffs", ("font-family", "serif")),
      ("ffss", ("font-family", "sans-serif")),
      ("ffc", ("font-family", "cursive")),
      ("fff", ("font-family", "fantasy")),
      ("ffm", ("font-family", "monospace")),
    #)),
    #("Sizing (Zen CSS)", (
      ("mswm:", ("-ms-writing-mode", "")),
      ("va:", ("vertical-align", "")),
      ("va:sup", ("vertical-align", "super")),
      ("va:t", ("vertical-align", "top")),
      ("va:tt", ("vertical-align", "text-top")),
      ("va:m", ("vertical-align", "middle")),
      ("va:ba", ("vertical-align", "baseline")),
      ("va:bo", ("vertical-align", "bottom")),
      ("va:tb", ("vertical-align", "text-bottom")),
      ("va:sub", ("vertical-align", "sub")),
      ("ta:", ("text-align", "")),
      ("ta:l", ("text-align", "left")),
      ("ta:c", ("text-align", "center")),
      ("ta:r", ("text-align", "right")),
      ("ta:j", ("text-align", "justify")),
      ("ta:s", ("text-align", "start")),
      ("ta:e", ("text-align", "end")),
      ("tal:", ("text-align-last", "")),
      ("mstal:", ("-ms-text-align-last", "")),
      ("tal:a", ("text-align-last", "auto")),
      ("tal:l", ("text-align-last", "left")),
      ("tal:c", ("text-align-last", "center")),
      ("tal:r", ("text-align-last", "right")),
      ("tal:j", ("text-align-last", "justify")),
      ("td:", ("text-decoration", "")),
      ("td:n", ("text-decoration", "none")),
      ("td:o", ("text-decoration", "overline")),
      ("td:lt", ("text-decoration", "line-through")),
      ("td:u", ("text-decoration", "underline")),
      ("te:", ("text-emphasis", "")),
      ("tec:", ("text-emphasis-color", "")),
      ("tes:", ("text-emphasis-style", "")),
      ("tep:", ("text-emphasis-position", "")),
      ("ti:", ("text-indent", "")),
      ("ti:el", ("text-indent", "each-line")),
      ("ti:h", ("text-indent", "hanging")),
      ("tj:", ("text-justify", "")),
      ("tj:a", ("text-justify", "auto")),
      ("tj:iw", ("text-justify", "inter-word")),
      ("tj:ii", ("text-justify", "inter-ideograph")),
      ("tj:ic", ("text-justify", "inter-cluster")),
      ("tj:d", ("text-justify", "distribute")),
      ("tj:dal", ("text-justify", "distribute-all-lines")),
      ("tj:dcl", ("text-justify", "distribute-center-last")),
      ("tj:k", ("text-justify", "kashida")),
      ("tj:n", ("text-justify", "newspaper")),
      ("tj:t", ("text-justify", "tibetan")),
      # ("to:", ("text-outline", "")), # text-overflow is more popular
      ("to:n", ("text-outline", "none")),
      ("tt:", ("text-transform", "")),
      ("tt:n", ("text-transform", "none")),
      ("tt:c", ("text-transform", "capitalize")),
      ("tt:u", ("text-transform", "uppercase")),
      ("tt:l", ("text-transform", "lowercase")),
      ("tt:f", ("text-transform", "fullwidth")),
      ("tw:", ("text-wrap", "")),
      ("tw:n", ("text-wrap", "normal")),
      ("tw:no", ("text-wrap", "none")),
      ("tw:u", ("text-wrap", "unrestricted")),
      ("tw:a", ("text-wrap", "avoid")),
      ("tov:", ("text-overflow", "")),
      ("mstov:", ("-ms-text-overflow", "")),
      ("tove:", ("text-overflow-ellipsis", "")),
      ("tovm:", ("text-overflow-mode", "")),
      ("tovm:c", ("text-overflow-mode", "clip")),
      ("tovm:e", ("text-overflow-mode", "ellipsis")),
      ("tovm:ew", ("text-overflow-mode", "ellipsis-word")),
      ("tsh:", ("text-shadow", "")),
      ("tsh:n", ("text-shadow", "none")),
      ("lh:", ("line-height", "")),
      ("lh:n", ("line-height", "normal")),
      ("whs:", ("white-space", "")),
      ("whs:n", ("white-space", "normal")),
      ("whs:p", ("white-space", "pre")),
      ("whs:nw", ("white-space", "nowrap")),
      ("whs:pw", ("white-space", "pre-wrap")),
      ("whs:pl", ("white-space", "pre-line")),
      ("wos:", ("word-spacing", "")),
      ("wos:n", ("word-spacing", "normal")),
      ("wow:", ("word-wrap", "")),
      ("wow:n", ("word-wrap", "normal")),
      ("wow:bw", ("word-wrap", "break-word")),
      ("wob:", ("word-break", "")),
      ("ts:", ("-moz-tab-size", "")),
      ("les:", ("letter-spacing", "")),
      ("les:n", ("letter-spacing", "normal")),
      ("f:", ("font", "")),
      ("fw:", ("font-weight", "")),
      ("fw:n", ("font-weight", "normal")),
      ("fw:b", ("font-weight", "bold")),
      ("fw:br", ("font-weight", "bolder")),
      ("fw:lr", ("font-weight", "lighter")),
      ("fw:1", ("font-weight", "100")),
      ("fw:2", ("font-weight", "200")),
      ("fw:3", ("font-weight", "300")),
      ("fw:4", ("font-weight", "400")),
      ("fw:5", ("font-weight", "500")),
      ("fw:6", ("font-weight", "600")),
      ("fw:7", ("font-weight", "700")),
      ("fw:8", ("font-weight", "800")),
      ("fw:9", ("font-weight", "900")),
      # ("fs:", ("font-style", "")), # font-size is more popular than font-style
      ("fs:n", ("font-style", "normal")),
      ("fs:i", ("font-style", "italic")),
      ("fs:o", ("font-style", "oblique")),
      ("fv:", ("font-variant", "")),
      ("fv:n", ("font-variant", "normal")),
      ("fv:sc", ("font-variant", "small-caps")),
      ("fza:", ("font-size-adjust", "")),
      ("fza:n", ("font-size-adjust", "none")),
      ("fst:", ("font-stretch", "")),
      ("fst:n", ("font-stretch", "normal")),
      ("fst:uc", ("font-stretch", "ultra-condensed")),
      ("fst:ec", ("font-stretch", "extra-condensed")),
      ("fst:c", ("font-stretch", "condensed")),
      ("fst:sc", ("font-stretch", "semi-condensed")),
      ("fst:se", ("font-stretch", "semi-expanded")),
      ("fst:e", ("font-stretch", "expanded")),
      ("fst:ee", ("font-stretch", "extra-expanded")),
      ("fst:ue", ("font-stretch", "ultra-expanded")),
      ("fz:", ("font-size", "")),
      ("ff:", ("font-family", "")),
      ("ff:s", ("font-family", "serif")),
      ("ff:ss", ("font-family", "sans-serif")),
      ("ff:c", ("font-family", "cursive")),
      ("ff:f", ("font-family", "fantasy")),
      ("ff:m", ("font-family", "monospace")),
    #)),
    
    #("Visual", (
      ("op", ("opacity", "")),
      ("re", ("resize", "")),
      ("ren", ("resize", "none")),
      ("reb", ("resize", "both")),
      ("reh", ("resize", "horizontal")),
      ("rev", ("resize", "vertical")),
      ("cu", ("cursor", "")),
      ("cua", ("cursor", "auto")),
      ("cud", ("cursor", "default")),
      ("cun", ("cursor", "none")),
      ("cucm", ("cursor", "context-menu")),
      ("cuh", ("cursor", "help")),
      ("cup", ("cursor", "pointer")),
      ("cupr", ("cursor", "progress")),
      ("cuw", ("cursor", "wait")),
      ("cuc", ("cursor", "cell")),
      ("cucr", ("cursor", "crosshair")),
      ("cut", ("cursor", "text")),
      ("cuvt", ("cursor", "vertical-text")),
      ("cual", ("cursor", "alias")),
      ("cucp", ("cursor", "copy")),
      ("cumv", ("cursor", "move")),
      ("cund", ("cursor", "no-drop")),
      ("cuna", ("cursor", "not-allowed")),
      ("cuer", ("cursor", "e-resize")),
      ("cunr", ("cursor", "n-resize")),
      ("cuner", ("cursor", "ne-resize")),
      ("cunwr", ("cursor", "nw-resize")),
      ("cusr", ("cursor", "s-resize")),
      ("cuser", ("cursor", "se-resize")),
      ("cuswr", ("cursor", "sw-resize")),
      ("cuwr", ("cursor", "w-resize")),
      ("cuewr", ("cursor", "ew-resize")),
      ("cunsr", ("cursor", "ns-resize")),
      ("cuneswr", ("cursor", "nesw-resize")),
      ("cunwser", ("cursor", "nwse-resize")),
      ("cucor", ("cursor", "col-resize")),
      ("curor", ("cursor", "row-resize")),
      ("cuals", ("cursor", "all-scroll")),
      ("ni", ("nav-index", "")),
      ("nia", ("nav-index", "auto")),
      ("nu", ("nav-up", "")),
      ("nua", ("nav-up", "auto")),
      ("nr", ("nav-right", "")),
      ("nra", ("nav-right", "auto")),
      ("nd", ("nav-down", "")),
      ("nda", ("nav-down", "auto")),
      ("nl", ("nav-left", "")),
      ("nla", ("nav-left", "auto")),
    #)),
    #("Visual (Zen CSS)", (
      ("op:", ("opacity", "")),
      ("rz:", ("resize", "")),
      ("rz:n", ("resize", "none")),
      ("rz:b", ("resize", "both")),
      ("rz:h", ("resize", "horizontal")),
      ("rz:v", ("resize", "vertical")),
      ("cur:", ("cursor", "")),
      ("cur:a", ("cursor", "auto")),
      ("cur:d", ("cursor", "default")),
      ("cur:n", ("cursor", "none")),
      ("cur:cm", ("cursor", "context-menu")),
      ("cur:h", ("cursor", "help")),
      ("cur:p", ("cursor", "pointer")),
      ("cur:pr", ("cursor", "progress")),
      ("cur:w", ("cursor", "wait")),
      ("cur:c", ("cursor", "cell")),
      ("cur:cr", ("cursor", "crosshair")),
      ("cur:t", ("cursor", "text")),
      ("cur:vt", ("cursor", "vertical-text")),
      ("cur:al", ("cursor", "alias")),
      ("cur:cp", ("cursor", "copy")),
      ("cur:mv", ("cursor", "move")),
      ("cur:nd", ("cursor", "no-drop")),
      ("cur:na", ("cursor", "not-allowed")),
      ("cur:er", ("cursor", "e-resize")),
      ("cur:nr", ("cursor", "n-resize")),
      ("cur:ner", ("cursor", "ne-resize")),
      ("cur:nwr", ("cursor", "nw-resize")),
      ("cur:sr", ("cursor", "s-resize")),
      ("cur:ser", ("cursor", "se-resize")),
      ("cur:swr", ("cursor", "sw-resize")),
      ("cur:wr", ("cursor", "w-resize")),
      ("cur:ewr", ("cursor", "ew-resize")),
      ("cur:nsr", ("cursor", "ns-resize")),
      ("cur:neswr", ("cursor", "nesw-resize")),
      ("cur:nwser", ("cursor", "nwse-resize")),
      ("cur:cor", ("cursor", "col-resize")),
      ("cur:ror", ("cursor", "row-resize")),
      ("cur:als", ("cursor", "all-scroll")),
      ("ni:", ("nav-index", "")),
      ("ni:a", ("nav-index", "auto")),
      ("nu:", ("nav-up", "")),
      ("nu:a", ("nav-up", "auto")),
      ("nr:", ("nav-right", "")),
      ("nr:a", ("nav-right", "auto")),
      ("nd:", ("nav-down", "")),
      ("nd:a", ("nav-down", "auto")),
      ("nl:", ("nav-left", "")),
      ("nl:a", ("nav-left", "auto")),
    #)),
    
    #("Layout", (
      ("ub", ("unicode-bidi", "")),
      ("ubn", ("unicode-bidi", "normal")),
      ("ube", ("unicode-bidi", "embed")),
      ("ubbo", ("unicode-bidi", "bidi-override")),
      ("dir", ("direction", "")),
      ("dirl", ("direction", "ltr")),
      ("dirr", ("direction", "rtl")),
      # ("or", ("orphans", "")), # not enough popularity to decide
      ("wiw", ("widows", "")),
    #)),
    #("Layout (Zen CSS)", (
      ("ub:", ("unicode-bidi", "")),
      ("ub:n", ("unicode-bidi", "normal")),
      ("ub:e", ("unicode-bidi", "embed")),
      ("ub:bo", ("unicode-bidi", "bidi-override")),
      ("dir:", ("direction", "")),
      ("dir:l", ("direction", "ltr")),
      ("dir:r", ("direction", "rtl")),
      ("orp:", ("orphans", "")),
      # ("wid:", ("widows", "")), # who use widows? :)
    #)),
    
    #("Document", (
      ("z", ("zoom", "")),
      ("za", ("zoom", "auto")),
      ("ori", ("orientation", "")),
      ("oria", ("orientation", "auto")),
      ("orip", ("orientation", "portrait")),
      ("oril", ("orientation", "landscape")),
    #)),
    #("Document (Zen CSS)", (
      ("zo:", ("zoom", "")),
      ("zo:a", ("zoom", "auto")),
      ("or:", ("orientation", "")),
      ("or:a", ("orientation", "auto")),
      ("or:p", ("orientation", "portrait")),
      ("or:l", ("orientation", "landscape")),
    #)),
  )
  
  
  class AbbrTests(unittest.TestCase):
      def is_eq(self, k, test_tuple):
          hayaku_result = extract(k)
  
          self.assertTrue(hayaku_result)
  
          test_property, test_value = test_tuple
          value_extracted = hayaku_result.get('keyword-value', '')
          self.assertEqual(
              (hayaku_result['property-name'], value_extracted), test_tuple,
              "hayaku: '{0}' and test: '{1}'".format('{0} {1}'.format( hayaku_result['property-name'], value_extracted), '{0} {1}'.format(*test_tuple))
          )
  
  if __name__ == '__main__':
      def ch(a, b):
          return lambda self: self.is_eq(a, b)
  
      for k, v in TESTS:
          name = 'test_{0}'.format(k)
          setattr(AbbrTests, name, ch(k, v))
  
      unittest.main()
  