Updates to build with stack and upstream changes

I figured this would be harder considering I haven't touched it in far
too long. Didn't take much work at all to get it built and running
again, and all tests (such as they are) pass.

+ stack didn't like the exe and test exe both using Main.hs
+ filled out other-modules in .cabal at stack's suggestion
+ EitherT is now ExceptT
+ pipes-concurrency deprecated `Unbounded` in favor of `unbounded`
+ tasty's wrapper of HSpec is now in IO
+ misc minor hLint changes
This commit is contained in:
Levi Pearson
2016-01-31 20:14:35 -07:00
parent f8b361dc5b
commit a4e724ebff
8 changed files with 80 additions and 27 deletions

View File

@@ -2,21 +2,15 @@
module ParseTests where
import Test.Tasty
import Test.Tasty.Hspec as HS
import Data.Attoparsec.ByteString.Char8 as P
import Data.ByteString.Char8 as C8
import Data.List
import Data.Ord
import Pipes.IRC.Message.Parse
import Pipes.IRC.Message.Render
import Pipes.IRC.Message.Types
msgParseSpec :: Spec
msgParseSpec = do
msgParseSpec =
describe "Parsing" $ do
describe "parseMsgOrLine" $ do

View File

@@ -6,11 +6,8 @@ import Test.Tasty
import Test.Tasty.Hspec as HS
import Test.Tasty.QuickCheck as QC
import Control.Applicative
import qualified Data.ByteString.Char8 as C8
import Data.List
import Data.Monoid
import ParseTests
@@ -20,18 +17,25 @@ import Pipes.IRC.Server.Types
import Pipes.IRC.Server.User
main :: IO ()
main = defaultMain tests
main = do
ts <- tests
defaultMain ts
tests :: TestTree
tests = testGroup "Tests" [specs, userProperties, chanProperties]
tests :: IO TestTree
tests = do
sps <- specs
return $ testGroup "Tests" [sps, userProperties, chanProperties]
-- Hspec Tests
specs :: TestTree
specs = testGroup "Specifications"
[ HS.testCase "Message Parsing" msgParseSpec
-- , HS.testCase "Message Rendering" msgRenderSpec
]
specs :: IO TestTree
specs = do
mps <- HS.testSpec "Message Parsing" msgParseSpec
-- mrs <- HS.testCase "Message Rendering" msgRenderSpec
return $ testGroup "Specifications"
[ mps
-- , mrs
]
-- QuickCheck and SmallCheck properties
{-