summaryrefslogtreecommitdiffhomepage
path: root/Test.hs
diff options
context:
space:
mode:
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