File: TestUtil.hs

package info (click to toggle)
haskell-libmpd 0.10.0.1-1
  • links: PTS
  • area: main
  • in suites: sid, trixie
  • size: 332 kB
  • sloc: haskell: 2,776; makefile: 6
file content (21 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module TestUtil (
  with
, withPassword
, module StringConn
, module Test.Hspec
) where

import           Network.MPD.Core
import           Network.MPD.Applicative

import           Test.Hspec
import           StringConn

with :: Eq a => Command a -> [(Expect, Response String)] -> Response a
with = flip testMPD . runCommand

withPassword :: Eq a => Password
             -> [(Expect, Response String)]
             -> Command a
             -> Response a
withPassword pwd ps m = testMPDWithPassword ps pwd (runCommand m)