Setup CI
Some checks failed
Haskell CI / build (pull_request) Successful in 2m19s
Haskell CI / test (pull_request) Successful in 2m11s
Haskell CI / fourmolu (pull_request) Successful in 5s
Haskell CI / hlint (pull_request) Failing after 5s

This commit is contained in:
Igor Ranieri 2025-09-27 07:51:09 +00:00
parent 2fa45ab5cc
commit 42b9dedbab
8 changed files with 231 additions and 52 deletions

View file

@ -1,8 +1,9 @@
{-# 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
@ -12,6 +13,9 @@ import Data.String (IsString (..))
import Data.Text (Text)
import GHC.Stack
import Text.Parsec.Pos
import Test.Hspec
import Text.Parsec.Pos
import Types
main :: IO ()
main = hspec $ do
@ -34,9 +38,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
@ -53,10 +57,12 @@ modules = do
, (1, 18, Anchor "myAnchor")
]
"\"OtherModule.Name\\#myAnchor\""
`shouldLexTo` [ (1, 2, Module "OtherModule.Name")
, (1, 18, Anchor "myAnchor")
]
link :: Expectation
link =
"[link to](http://some.website)"