summaryrefslogtreecommitdiff
path: root/lib/custodian
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-23 16:03:27 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-23 16:03:27 +0000
commit75a527380f8059de660fe911be4f6acf63da3cde (patch)
treef09f57a4138d42901b5bf694ea51f8787087bdd6 /lib/custodian
parent3cf93c18f70758453899fa8bfa71591fcb6e83f5 (diff)
Test that inverted() works for each protocol test we know about.
Diffstat (limited to 'lib/custodian')
-rw-r--r--lib/custodian/protocoltest/dns.rb8
-rw-r--r--lib/custodian/protocoltest/http.rb9
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/custodian/protocoltest/dns.rb b/lib/custodian/protocoltest/dns.rb
index 6c5e8db..d1c6ee2 100644
--- a/lib/custodian/protocoltest/dns.rb
+++ b/lib/custodian/protocoltest/dns.rb
@@ -33,6 +33,14 @@ module Custodian
#
@line = line
+ #
+ # Is this test inverted?
+ #
+ if ( line =~ /must\s+not\s+run\s+/ )
+ @inverted = true
+ else
+ @inverted = false
+ end
end
diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb
index 1b7f442..133fdaf 100644
--- a/lib/custodian/protocoltest/http.rb
+++ b/lib/custodian/protocoltest/http.rb
@@ -47,6 +47,15 @@ module Custodian
raise ArgumentError, "The target wasn't an URL"
end
+ #
+ # Is this test inverted?
+ #
+ if ( line =~ /must\s+not\s+run\s+/ )
+ @inverted = true
+ else
+ @inverted = false
+ end
+
end