From c8c9bdf53d183d77e92ead8db8120be9dab33251 Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Tue, 01 Apr 2008 12:18:40 +0000
Subject: [PATCH] Fix tests spec generation

---
 opends/tests/functional-tests/testcases/clu/clu_ldifsearch_checkbehavior.xml      |    3 ---
 opends/tests/shared/java/parsingtool/WriteXMLFile_xml.java                        |    8 +++-----
 opends/tests/functional-tests/testcases/clu/clu.xml                               |    3 ++-
 opends/tests/shared/java/parsingtool/ParseData.java                               |    2 +-
 opends/tests/functional-tests/testcases/clu/clu_encode-password_checkbehavior.xml |    3 +++
 opends/tests/functional-tests/testcases/clu/clu_ldapsearch_checkbehavior.xml      |    2 +-
 6 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/opends/tests/functional-tests/testcases/clu/clu.xml b/opends/tests/functional-tests/testcases/clu/clu.xml
index fbcd1a0..c063f8d 100644
--- a/opends/tests/functional-tests/testcases/clu/clu.xml
+++ b/opends/tests/functional-tests/testcases/clu/clu.xml
@@ -49,6 +49,7 @@
           
           <!--- 
             Links between tests:
+            - clu_ldapsearch_checkbehavior add a new suffix
             - clu_ldapdelete_checkbehavior remove one entry under dc=com
             - clu_rebuild-index_checkbehavior add a new index
             - clu_make-ldif_checkbehavior import new data
@@ -76,7 +77,7 @@
             testList.append(['.','clu_manage-tasks_checkbehavior'])
             testList.append(['.','clu_dbtest_checkbehavior'])
             testList.append(['.','clu_ldifmodify_checkbehavior'])
-            testList.append(['.','clu_ldif-diff_checkbehavior'])            
+            testList.append(['.','clu_ldif-diff_checkbehavior'])
             testList.append(['.','clu_cleanup'])
           </script>
           
diff --git a/opends/tests/functional-tests/testcases/clu/clu_encode-password_checkbehavior.xml b/opends/tests/functional-tests/testcases/clu/clu_encode-password_checkbehavior.xml
index 26d276c..0be4078 100644
--- a/opends/tests/functional-tests/testcases/clu/clu_encode-password_checkbehavior.xml
+++ b/opends/tests/functional-tests/testcases/clu/clu_encode-password_checkbehavior.xml
@@ -370,6 +370,9 @@
             #@TestName            encode-password: compare pwds encoded with 
                                   -a option 
             #@TestIssue           none
+            #@TestPurpose         Test encode-password to compare pwds encoded 
+                                  with -a option.            
+            #@TestPreamble        none            
             #@TestStep            Do an encode-password to compare pwds without
                                   -a option and with -r option
             #@TestStep            Do an encode-password to compare good pwds with
diff --git a/opends/tests/functional-tests/testcases/clu/clu_ldapsearch_checkbehavior.xml b/opends/tests/functional-tests/testcases/clu/clu_ldapsearch_checkbehavior.xml
index 40ca331..542a770 100644
--- a/opends/tests/functional-tests/testcases/clu/clu_ldapsearch_checkbehavior.xml
+++ b/opends/tests/functional-tests/testcases/clu/clu_ldapsearch_checkbehavior.xml
@@ -409,7 +409,7 @@
           <!--- Test Case information
             #@TestMarker          ldapsearch check behavior tests
             #@TestName            ldapsearch: check behavior with a scope of
-                                  "base" and a basedn of ""
+                                  base and a basedn of ''
             #@TestIssue           none
             #@TestPurpose         Verify that the Root DSE entry is returned.
             #@TestPreamble        none
diff --git a/opends/tests/functional-tests/testcases/clu/clu_ldifsearch_checkbehavior.xml b/opends/tests/functional-tests/testcases/clu/clu_ldifsearch_checkbehavior.xml
index bd912f5..1399ae7 100644
--- a/opends/tests/functional-tests/testcases/clu/clu_ldifsearch_checkbehavior.xml
+++ b/opends/tests/functional-tests/testcases/clu/clu_ldifsearch_checkbehavior.xml
@@ -395,9 +395,6 @@
             #@TestIssue           none
             #@TestPurpose         Verify the output of ldifsearch with @ocname 
                                   in the list of requested attributes.
-            #@TestPurpose         Verify that the output returned by ldifseach
-                                  are the same than the entries returned by
-                                  ldapsearch
             #@TestPreamble        none
             #@TestStep            Do an ldapsearch using @person as attribute
             #@TestStep            Do an ldifsearch with the same option.
diff --git a/opends/tests/shared/java/parsingtool/ParseData.java b/opends/tests/shared/java/parsingtool/ParseData.java
index 9959cc4..50c02e0 100644
--- a/opends/tests/shared/java/parsingtool/ParseData.java
+++ b/opends/tests/shared/java/parsingtool/ParseData.java
@@ -109,7 +109,7 @@
                   }
                   else if(tmpStr.indexOf("#@TestName") >= 0)
                   {
-                    arrayData.setTestName(StripSubstring(tmpStr, "#@TestName"));
+                    arrayData.setTestName(MultipleLines(tmpStr, "#@TestName", fin));
                     arrayData.setTestSuite(fileDir);
                   }
                   else if(tmpStr.indexOf("#@TestMarker") >= 0)
diff --git a/opends/tests/shared/java/parsingtool/WriteXMLFile_xml.java b/opends/tests/shared/java/parsingtool/WriteXMLFile_xml.java
index 0cc36f2..39d6564 100644
--- a/opends/tests/shared/java/parsingtool/WriteXMLFile_xml.java
+++ b/opends/tests/shared/java/parsingtool/WriteXMLFile_xml.java
@@ -135,22 +135,20 @@
             fwOutput.write("              </step>\n");
           }
           fwOutput.write("            </steps>\n");
-          String tmpString = new String(arrayData.getTestPreamble(j));
-          if (tmpString.length() == 0) {
+          String tmpString = arrayData.getTestPreamble(j);
+          if (tmpString == null || tmpString.length() == 0) {
             fwOutput.write("            <preamble>None</preamble>\n");
           } else {
             fwOutput.write("            <preamble>" + tmpString
                 + "</preamble>\n");
           }
-          tmpString = new String(arrayData.getTestPostamble(j));
+          tmpString = arrayData.getTestPostamble(j);
           if (tmpString == null || tmpString.length() == 0) {
             fwOutput.write("            <postamble>None</postamble>\n");
           } else {
             fwOutput.write("            <postamble>" + tmpString
                 + "</postamble>\n");
           }
-          fwOutput.write("            <postamble>"
-              + arrayData.getTestPostamble(j) + "</postamble>\n");
           fwOutput.write("            <result>\n");
           fwOutput.write("             " + arrayData.getTestResult(j) + "\n");
           fwOutput.write("            </result>\n");

--
Gitblit v1.10.0