Truly add the test suite source files, which should have gone in a few commits ago.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 1 Aug 2013 19:34:53 +0000 (15:34 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 1 Aug 2013 19:34:53 +0000 (15:34 -0400)
test/Doctests.hs [new file with mode: 0644]
test/TestSuite.hs [new file with mode: 0644]

diff --git a/test/Doctests.hs b/test/Doctests.hs
new file mode 100644 (file)
index 0000000..d183b4b
--- /dev/null
@@ -0,0 +1,13 @@
+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 = do
+  sources <- find_sources
+  doctest $ ["-isrc", "-idist/build/autogen"] ++ sources
diff --git a/test/TestSuite.hs b/test/TestSuite.hs
new file mode 100644 (file)
index 0000000..7c553d2
--- /dev/null
@@ -0,0 +1,18 @@
+module Main
+where
+
+import Data.Monoid (mempty)
+import Test.Framework (
+  Test,
+  defaultMainWithOpts )
+import Test.Framework.Runners.Options ( RunnerOptions )
+
+import DNS (dns_properties, dns_tests)
+
+main :: IO ()
+main = do
+  let empty_options = mempty :: RunnerOptions
+  defaultMainWithOpts tests empty_options
+
+tests :: [Test]
+tests = [ dns_properties, dns_tests ]