X-Git-Url: http://www.average.org/gitweb/?p=pdns-pipe-nmc.git;a=blobdiff_plain;f=test.hs;h=117994d76e6e706503b81982f0976af42d3d0b80;hp=1f19426c139401552e0b9f066df0f9c1382376dd;hb=2150a36b051d145b77701dbdedbd7abfc1ab6b36;hpb=fbe7735ec10867611bc9d202fce4336c36c8af66 diff --git a/test.hs b/test.hs index 1f19426..117994d 100644 --- 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 <- descendNmcDom queryOp [] $ seedNmcDom "root" - putStrLn $ show d + (d:_) <- getArgs + descendNmcDom queryOp [] (seedNmcDom d) >>= print + descendNmcDom queryOp ["_tcp","_smtp"] (seedNmcDom d) >>= print