From d44fc5b2b40e26e76d2fe7ac0a47bea84154cf67 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Sun, 28 Jun 2015 00:00:33 +0200 Subject: Setup HSpec framework for Haddock API package. --- haddock-api/haddock-api.cabal | 31 ++++++++++++++++++++++ .../Haddock/Backends/Hyperlinker/ParserSpec.hs | 17 ++++++++++++ haddock-api/test/Spec.hs | 1 + 3 files changed, 49 insertions(+) create mode 100644 haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs create mode 100644 haddock-api/test/Spec.hs (limited to 'haddock-api') diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal index 23c4497a..56889e66 100644 --- a/haddock-api/haddock-api.cabal +++ b/haddock-api/haddock-api.cabal @@ -96,6 +96,37 @@ library Haddock.Convert Paths_haddock_api +test-suite spec + type: exitcode-stdio-1.0 + default-language: Haskell2010 + main-is: Spec.hs + ghc-options: -Wall + + hs-source-dirs: + test + , src + + other-modules: + Haddock.Backends.Hyperlinker.ParserSpec + + build-depends: + base >= 4.3 && < 4.9 + , bytestring + , filepath + , directory + , containers + , deepseq + , array + , xhtml >= 3000.2 && < 3000.3 + , Cabal >= 1.10 + , ghc >= 7.10 && < 7.10.2 + + , ghc-paths + , haddock-library == 1.2.* + + , hspec + , QuickCheck == 2.* + source-repository head type: git location: https://github.com/haskell/haddock.git diff --git a/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs b/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs new file mode 100644 index 00000000..c85fa47e --- /dev/null +++ b/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs @@ -0,0 +1,17 @@ +module Haddock.Backends.Hyperlinker.ParserSpec (main, spec) where + + +import Test.Hspec + +import Haddock.Backends.Hyperlinker.Parser + + +main :: IO () +main = hspec spec + +spec :: Spec +spec = do + describe "parse" parseSpec + +parseSpec :: Spec +parseSpec = return () diff --git a/haddock-api/test/Spec.hs b/haddock-api/test/Spec.hs new file mode 100644 index 00000000..a824f8c3 --- /dev/null +++ b/haddock-api/test/Spec.hs @@ -0,0 +1 @@ +{-# OPTIONS_GHC -F -pgmF hspec-discover #-} -- cgit v1.2.3