{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Text.MMark.Extension.SkylightingSpec (spec) where import Test.Hspec import Text.MMark.Extension.Skylighting import Text.MMark.Extension.TestUtils spec :: Spec spec = describe "skylighting" $ do let to = withExt skylighting context "when info string does not result in a successful lookup" $ it "has no effect" $ "```foo\nmain :: IO ()\nmain = return ()\n```\n" `to` "
main :: IO ()\nmain = return ()\n
\n" context "with info string results in a successful lookup" $ it "renders it correctly" $ "```haskell\nmain :: IO ()\nmain = return ()\n```\n" `to` #if MIN_VERSION_skylighting(0,7,6) -- version 0.7.6 and later "
main :: IO ()\nmain = return ()\n
\n" #elif MIN_VERSION_skylighting(0,7,4) -- versions 0.7.4 and 0.7.5 "
main :: IO ()\nmain = return ()\n
\n" #else -- versions older than 0.7.4 "
main :: IO ()\nmain = return ()\n
\n" #endif