From 4b50a2b0cb6125db0a4f7c84768b2736b6ac5552 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Tue, 6 Sep 2011 16:33:49 +0900 Subject: Supporting SRV. --- Test.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Test.hs') 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 -- cgit v1.2.3