Skip to content

Commit

Permalink
Add doc-test testsuite, fixing doc examples
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jul 16, 2022
1 parent c35c7a6 commit 1a5bbbf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/DocTestMain.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module Main where

import System.Environment
( getArgs )
import Test.DocTest
( mainFromLibrary )
import Test.DocTest.Helpers
( extractSpecificCabalLibrary, findCabalPackage )

main :: IO ()
main = do
args <- getArgs
pkg <- findCabalPackage "regex-tdfa"
-- Need to give the library name, otherwise the parser does not find it.
lib <- extractSpecificCabalLibrary Nothing pkg
mainFromLibrary lib args

0 comments on commit 1a5bbbf

Please sign in to comment.