]> www.average.org Git - pdns-pipe-nmc.git/blobdiff - test.hs
update comment and cosmetic about "import"/"delegate"
[pdns-pipe-nmc.git] / test.hs
diff --git a/test.hs b/test.hs
index eb3bfb9c4b8208efa7fe3205d0772fa3aef02ea8..3a9f8b4e0c4c2c92d4858fbdafbaa9dbf547ff26 100644 (file)
--- a/test.hs
+++ b/test.hs
@@ -3,18 +3,21 @@
 module Main where
 
 import Prelude hiding (readFile)
 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
 import Control.Exception
 import Data.ByteString.Lazy (ByteString)
 import Data.ByteString.Lazy.Char8 (readFile)
 import System.IO.Error
 import Control.Exception
+import Text.Show.Pretty
 
 import NmcDom
 
 import NmcDom
+import NmcTransform
 
 queryOp :: String -> IO (Either String ByteString)
 queryOp key = catch (readFile key >>= return . Right)
                     (\e -> return (Left (show (e :: IOException))))
 
 main = do
 
 queryOp :: String -> IO (Either String ByteString)
 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) >>= putStrLn . ppShow