packages feed

mdoc-0.2.0.0: test/Mdoc/Test/Render.hs

-- |
--
-- Module      : Mdoc.Test.Render
-- Copyright   : (c) 2026 Patrick Brisbin
-- License     : AGPL-3
-- Maintainer  : pbrisbin@gmail.com
-- Stability   : experimental
-- Portability : POSIX
module Mdoc.Test.Render
  ( shouldRender
  ) where

import Mdoc.Prelude

import Data.Text qualified as T
import Mdoc.Pretty
import Test.Hspec

shouldRender :: (HasCallStack, Pretty a) => a -> [Text] -> Expectation
shouldRender a lns =
  renderPlain (pretty a) `shouldBe` T.intercalate "\n" lns

infix 1 `shouldRender`