{-# LANGUAGE OverloadedStrings #-} module Hasmin.Types.ShadowSpec where import Data.Text (Text) import Hasmin.Parser.Value import Hasmin.TestUtils shadowTests :: Spec shadowTests = describe " minification tests" $ mapM_ (matchSpecWithDesc f) shadowTestsInfo where f = minifyWithTestConfig <$> shadowList shadowTestsInfo :: [(String, Text, Text)] shadowTestsInfo = [("Removes 4th value when it is null" ,"1px 1px 1px 0px red" ,"1px 1px 1px red") ,("Removes 3rd value when there is no 4th, and it is zero" ,"1px 1px 0px red" ,"1px 1px red") ,("Minifies permuted value" ,"red 1px 1px 0px 0px inset" ,"inset 1px 1px red") ,("Minifies the value" ,"inset 1px 1px #ff0000" ,"inset 1px 1px red") ,("Minifies the values" ,"inset 12px 12px 12px 12px blue" ,"inset 9pt 9pt 9pt 9pt blue") ,("Minifies list of values" ,"inset 12px 12px 0 0 blue, 12px 12px 3px 0 red" ,"inset 9pt 9pt blue,9pt 9pt 3px red") ] spec :: Spec spec = shadowTests main :: IO () main = hspec spec