From 2150a36b051d145b77701dbdedbd7abfc1ab6b36 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Mon, 14 Apr 2014 10:04:44 +0400 Subject: [PATCH] some test cases from the field --- d/ddomob | 1 + d/dnameid | 1 + d/domob | 1 + d/nameid | 1 + test.hs | 6 ++++-- 5 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 d/ddomob create mode 100644 d/dnameid create mode 100644 d/domob create mode 100644 d/nameid 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 -- 2.43.0