summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorpharpend <>2015-05-16 15:45:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2015-05-16 15:45:00 (GMT)
commit2bebe448d9f167367d5ef84de93affa781360a13 (patch)
tree7576c474630ca32bc205d9e118b8c9d09ea22b1f /test
version 0.1.0.00.1.0.0
Diffstat (limited to 'test')
-rw-r--r--test/main.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/main.hs b/test/main.hs
new file mode 100644
index 0000000..67ced70
--- /dev/null
+++ b/test/main.hs
@@ -0,0 +1,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