From 597b3754efba08cf99f30419b7cf3f9d4bf74b31 Mon Sep 17 00:00:00 2001
From: el_kaboing <el_kaboing@localhost>
Date: Tue, 12 Dec 2006 17:05:42 +0000
Subject: [PATCH] Added functional tests for Issue 323.

---
 opends/tests/functional-tests/shared/functions/utils.xml |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/opends/tests/functional-tests/shared/functions/utils.xml b/opends/tests/functional-tests/shared/functions/utils.xml
index b924840..12ef131 100755
--- a/opends/tests/functional-tests/shared/functions/utils.xml
+++ b/opends/tests/functional-tests/shared/functions/utils.xml
@@ -161,6 +161,48 @@
       
   </function>
 
+  <function name="checktestStringNotPresent">
+
+    <function-prolog>
+        This function checks the return string against an expected return substring that should not be present for a testcase
+    </function-prolog>
+
+    <function-map-args>
+        <function-required-arg name="testString">
+            the substring being tested from the command
+        </function-required-arg>
+        <function-required-arg name="returnString">
+            the return string received from command
+        </function-required-arg>
+ 
+    </function-map-args>
+
+      <sequence>
+         <script> 
+              import re 
+              searchre = re.compile('%s' % testString)
+            </script> 
+  
+            <if expr='re.search(searchre, returnString) == None'>
+              <sequence>
+              <tcstatus result="'pass'"/>
+              <message log="1">
+                'Success: Did Not Find substring, %s, in the return string' % (testString)
+              </message>
+              </sequence>
+            <else>
+              <sequence>
+              <tcstatus result="'fail'"/>
+              <message log="1" level="'Error'">
+                'Error: Found substring, %s, in the return string, %s' % (testString, returnString)
+              </message>
+              </sequence>
+            </else>
+            </if>
+      </sequence>
+      
+  </function>
+
   <function name="isAlive">
 
     <function-prolog>

--
Gitblit v1.10.0