]> www.average.org Git - pdns-pipe-nmc.git/blobdiff - test.hs
some test cases from the field
[pdns-pipe-nmc.git] / test.hs
diff --git a/test.hs b/test.hs
index eb3bfb9c4b8208efa7fe3205d0772fa3aef02ea8..117994d76e6e706503b81982f0976af42d3d0b80 100644 (file)
--- a/test.hs
+++ b/test.hs
@@ -3,6 +3,7 @@
 module Main where
 
 import Prelude hiding (readFile)
+import System.Environment
 import Data.ByteString.Lazy (ByteString)
 import Data.ByteString.Lazy.Char8 (readFile)
 import System.IO.Error
@@ -15,6 +16,7 @@ queryOp key = catch (readFile key >>= return . Right)
                     (\e -> return (Left (show (e :: IOException))))
 
 main = do
-        d <- mergeImport queryOp (emptyNmcDom {domImport = Just "d/root"})
-        putStrLn $ show d
+        (d:_) <- getArgs
+        descendNmcDom queryOp []               (seedNmcDom d) >>= print
+        descendNmcDom queryOp ["_tcp","_smtp"] (seedNmcDom d) >>= print