summaryrefslogtreecommitdiff
path: root/test/main.hs
blob: 67ced708f3c4f34123155f2342874f53f8bc6921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import qualified Data.ByteString.Lazy as B
import Data.Conduit.Binary
import Paths_pager
import System.Pager

testConduit :: FilePath ->  IO ()
testConduit fnom =
  sendToPagerConduit (sourceFile fnom)

test :: FilePath -> IO ()
test fp = B.readFile fp >>= sendToPager

main =
  do fnom <- getDataFileName "LICENSE"
     putStrLn "Hit Return to start the conduit-free test"
     _ <- getLine
     test fnom
     putStrLn "Hit Return to start the conduit test"
     _ <- getLine
     testConduit fnom