From 5bb3a16e7abf8785ac17e5b38cd0d40b82bf6469 Mon Sep 17 00:00:00 2001 From: Jonathan Cran Date: Fri, 11 Feb 2011 00:48:34 +0000 Subject: [PATCH] updated matchers git-svn-id: file:///home/svn/framework3/trunk@11741 4d416f70-5f16-0410-b530-b9f4589650da --- test/lib/msf_matchers.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/lib/msf_matchers.rb b/test/lib/msf_matchers.rb index 4afd99b5f9..0e6d528027 100644 --- a/test/lib/msf_matchers.rb +++ b/test/lib/msf_matchers.rb @@ -3,6 +3,31 @@ require 'regexr' module MsfMatchers + class ContainACompleteTest + + def initialize() + @r = Regexr.new(true) + end + + def matches?(data) + @data = data + return @r.verify_start_and_end(@data,"meterpreter_functional_test_start", "meterpreter_functional_test_end") + end + + def failure_message + "Beginning or end was incorrect." + end + + def negative_failure_message + "Expected to find a no beginning or end, but it matched." + end + + end + + def contain_a_complete_test + ContainACompleteTest.new + end + class ContainAllSuccesses def initialize(successes)