diff --git a/yesod-static/Yesod/Static.hs b/yesod-static/Yesod/Static.hs index 571b4316..56ee041f 100644 --- a/yesod-static/Yesod/Static.hs +++ b/yesod-static/Yesod/Static.hs @@ -41,7 +41,7 @@ module Yesod.Static , publicFiles -- * Hashing , base64md5 -#ifdef TEST +#ifdef TEST_EXPORT , getFileListPieces #endif ) where diff --git a/yesod-static/yesod-static.cabal b/yesod-static/yesod-static.cabal index 7841b7ff..08a2a47e 100644 --- a/yesod-static/yesod-static.cabal +++ b/yesod-static/yesod-static.cabal @@ -15,14 +15,7 @@ extra-source-files: test/YesodStaticTest.hs test/tests.hs -flag test - description: Build for use with running tests - default: False - library - if flag(test) - cpp-options: -DTEST - build-depends: base >= 4 && < 5 , containers >= 0.2 && < 0.5 , old-time >= 1.0 @@ -45,6 +38,36 @@ library exposed-modules: Yesod.Static ghc-options: -Wall +test-suite tests + hs-source-dirs: ., test + main-is: tests.hs + type: exitcode-stdio-1.0 + cpp-options: -DTEST_EXPORT + build-depends: base + , hspec >= 0.8 && < 0.10 + , HUnit + -- copy from above + , containers >= 0.2 && < 0.5 + , old-time >= 1.0 + , yesod-core >= 0.10 && < 0.11 + , base64-bytestring >= 0.1.0.1 && < 0.2 + , cereal >= 0.3 && < 0.4 + , bytestring >= 0.9.1.4 && < 0.10 + , template-haskell + , directory >= 1.0 && < 1.2 + , transformers >= 0.2.2 && < 0.3 + , wai-app-static >= 1.1 && < 1.2 + , wai >= 1.1 && < 1.2 + , text >= 0.9 && < 1.0 + , file-embed >= 0.0.4.1 && < 0.5 + , http-types >= 0.6.5 && < 0.7 + , unix-compat >= 0.2 + , conduit >= 0.2 + , crypto-conduit >= 0.1.1.2 && < 0.2 + , cryptohash >= 0.6.1 + + ghc-options: -Wall + source-repository head type: git location: https://github.com/yesodweb/yesod