]> gitweb.michael.orlitzky.com - numerical-analysis.git/blobdiff - test/Doctests.hs
numerical-analysis.cabal,doc: relicense to AGPL-3.0+
[numerical-analysis.git] / test / Doctests.hs
index f9bacc5b238a57740d046f53b3fa34c0528e175e..3cfd2a83cfbe679a541b18ac509f0780e175f552 100644 (file)
@@ -2,6 +2,12 @@ module Main
 where
 
 import Test.DocTest
+import System.FilePath.Find ((==?), always, extension, find)
+
+find_sources :: IO [FilePath]
+find_sources = find always (extension ==? ".hs") "src/"
 
 main :: IO ()
-main = doctest ["--optghc=-isrc", "src/Root.hs"]
+main = do
+  sources <- find_sources
+  doctest $ ["-isrc"] ++ sources