]> www.average.org Git - pdns-pipe-nmc.git/blobdiff - test.hs
cleanup main
[pdns-pipe-nmc.git] / test.hs
diff --git a/test.hs b/test.hs
index 8f5b77c330a53812d4a2e7b81f8a847e3faed911..eb3bfb9c4b8208efa7fe3205d0772fa3aef02ea8 100644 (file)
--- a/test.hs
+++ b/test.hs
@@ -4,17 +4,17 @@ module Main where
 
 import Prelude hiding (readFile)
 import Data.ByteString.Lazy (ByteString)
-import Data.ByteString.Lazy.Char8 (unpack, readFile)
+import Data.ByteString.Lazy.Char8 (readFile)
 import System.IO.Error
 import Control.Exception
 
 import NmcDom
 
-queryOp :: ByteString -> IO (Either String ByteString)
-queryOp key = catch (readFile ("d/" ++ (unpack key)) >>= return . Right)
+queryOp :: String -> IO (Either String ByteString)
+queryOp key = catch (readFile key >>= return . Right)
                     (\e -> return (Left (show (e :: IOException))))
 
 main = do
-        d <- queryDom queryOp "root"
+        d <- mergeImport queryOp (emptyNmcDom {domImport = Just "d/root"})
         putStrLn $ show d