diff --git a/yesod-core/Test/Widget.hs b/yesod-core/Test/Widget.hs index 4cd92a5c..b0bff8b2 100644 --- a/yesod-core/Test/Widget.hs +++ b/yesod-core/Test/Widget.hs @@ -21,6 +21,8 @@ data Y = Y mkMessage "Y" "test" "en" +type Strings = [String] + mkYesod "Y" [$parseRoutes| / RootR GET /foo/*Strings MultiR GET diff --git a/yesod-core/yesod-core.cabal b/yesod-core/yesod-core.cabal index 35794f2f..34508a8f 100644 --- a/yesod-core/yesod-core.cabal +++ b/yesod-core/yesod-core.cabal @@ -69,23 +69,24 @@ library if flag(test) Buildable: False -executable runtests +test-suite runtests + type: exitcode-stdio-1.0 if flag(ghc7) + type: exitcode-stdio-1.0 build-depends: base >= 4.3 && < 5 cpp-options: -DGHC7 + main-is: runtests.hs else + type: exitcode-stdio-1.0 build-depends: base >= 4 && < 4.3 - if flag(test) - Buildable: True - cpp-options: -DTEST - build-depends: test-framework, - test-framework-quickcheck2, - test-framework-hunit, - HUnit, - wai-test, - QuickCheck >= 2 && < 3 - else - Buildable: False + main-is: runtests.hs + cpp-options: -DTEST + build-depends: test-framework, + test-framework-quickcheck2, + test-framework-hunit, + HUnit, + wai-test, + QuickCheck >= 2 && < 3 ghc-options: -Wall main-is: runtests.hs