Add CI runner (#5)

Reviewed-on: elland/haddock2#5
Co-authored-by: Igor Ranieri <igor@elland.me>
Co-committed-by: Igor Ranieri <igor@elland.me>
This commit is contained in:
Igor Ranieri 2025-09-27 15:03:00 +00:00 committed by elland
parent d8ba47a8b6
commit 08dc87a307
7 changed files with 228 additions and 53 deletions

View file

@ -1,16 +1,15 @@
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wno-orphans #-}
import Test.Hspec
import Data.String (IsString (..))
import Data.Text (Text)
import GHC.Stack
import Identifier (Identifier)
import Lexer
import Parser
import Types
import Data.String (IsString (..))
import Data.Text (Text)
import GHC.Stack
import Test.Hspec
import Text.Parsec.Pos
main :: IO ()
@ -34,9 +33,9 @@ main = hspec $ do
describe "Parser" do
it "Bold" do
"__bold__" `shouldParseTo` (DocBold (DocString "bold"))
"__bold__" `shouldParseTo` DocBold (DocString "bold")
it "Emphasis" do
"/emphasis/" `shouldParseTo` (DocEmphasis (DocString "emphasis"))
"/emphasis/" `shouldParseTo` DocEmphasis (DocString "emphasis")
------------
-- Tests
@ -57,6 +56,7 @@ modules = do
`shouldLexTo` [ (1, 2, Module "OtherModule.Name")
, (1, 18, Anchor "myAnchor")
]
link :: Expectation
link =
"[link to](http://some.website)"