summaryrefslogtreecommitdiffhomepage
path: root/Test.hs
diff options
context:
space:
mode:
authorGravatar Kazu Yamamoto <kazu@iij.ad.jp>2011-09-06 16:33:49 +0900
committerGravatar Kazu Yamamoto <kazu@iij.ad.jp>2011-09-06 16:33:49 +0900
commit4b50a2b0cb6125db0a4f7c84768b2736b6ac5552 (patch)
tree9cc11fa644428b8f9f78442418081fb5815c41d5 /Test.hs
parent8e28329b12d1cabd0038e5d86c8c8edd9dfe0e5e (diff)
Supporting SRV.
Diffstat (limited to 'Test.hs')
-rw-r--r--Test.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Test.hs b/Test.hs
index efe7e4b..4a9cdfe 100644
--- a/Test.hs
+++ b/Test.hs
@@ -18,6 +18,7 @@ tests = [
, testCase "lookupAviaMX" test_lookupAviaMX
, testCase "lookupAviaCNAME" test_lookupAviaCNAME
, testCase "lookupPTR" test_lookupPTR
+ , testCase "lookupSRV" test_lookupSRV
]
]
@@ -72,5 +73,11 @@ test_lookupPTR = do
rev = BS.intercalate "." (reverse (BS.split '.' target))
`BS.append` ".in-addr.arpa"
+test_lookupSRV :: IO ()
+test_lookupSRV = do
+ rs <- makeResolvSeed defaultResolvConf
+ withResolver rs $ \resolver ->
+ DNS.lookupSRV resolver "_sip._tcp.cisco.com" ?= Just [(1,0,5060,"vcsgw.cisco.com.")]
+
main :: IO ()
main = defaultMain tests