From: Eugene Crosser Date: Mon, 14 Apr 2014 06:04:44 +0000 (+0400) Subject: some test cases from the field X-Git-Tag: 0.9.0.0~70 X-Git-Url: http://average.org/gitweb/?a=commitdiff_plain;h=2150a36b051d145b77701dbdedbd7abfc1ab6b36;p=pdns-pipe-nmc.git some test cases from the field --- diff --git a/d/ddomob b/d/ddomob new file mode 100644 index 0000000..09ed737 --- /dev/null +++ b/d/ddomob @@ -0,0 +1 @@ +{"ip":"37.187.243.109","map":{"*":"37.187.243.109"},"fingerprint":["F3ABCF9B979CAAADD6E3B5E7674A886A25F3F0BB"],"tor":"wivfwn64tm3uaeig.onion"} diff --git a/d/dnameid b/d/dnameid new file mode 100644 index 0000000..10b95b3 --- /dev/null +++ b/d/dnameid @@ -0,0 +1 @@ +{"import":"d/ddomob","tor":"yspwdthzg3tnmpzn.onion"} diff --git a/d/domob b/d/domob new file mode 100644 index 0000000..bb8c940 --- /dev/null +++ b/d/domob @@ -0,0 +1 @@ +{"import":"d/ddomob"} diff --git a/d/nameid b/d/nameid new file mode 100644 index 0000000..3d042b6 --- /dev/null +++ b/d/nameid @@ -0,0 +1 @@ +{"import":"d/dnameid"} diff --git a/test.hs b/test.hs index 3bcd4bc..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 - descendNmcDom queryOp [] (seedNmcDom "root") >>= print - descendNmcDom queryOp ["_tcp","_smtp"] (seedNmcDom "root") >>= print + (d:_) <- getArgs + descendNmcDom queryOp [] (seedNmcDom d) >>= print + descendNmcDom queryOp ["_tcp","_smtp"] (seedNmcDom d) >>= print