From a67f678ddfb77af77709b8cd84d2079e142c300a Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Tue, 04 Dec 2007 16:28:54 +0000
Subject: [PATCH] Allow to have multiple lines for @TestGroupPurpose, @TestSuitePurpose and @TestPurpose tags
---
opendj-sdk/opends/tests/shared/java/parsingtool/ParseData.java | 36 +++++++++++++++++++++---------------
1 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/opendj-sdk/opends/tests/shared/java/parsingtool/ParseData.java b/opendj-sdk/opends/tests/shared/java/parsingtool/ParseData.java
index 45b8efa..c66a393 100644
--- a/opendj-sdk/opends/tests/shared/java/parsingtool/ParseData.java
+++ b/opendj-sdk/opends/tests/shared/java/parsingtool/ParseData.java
@@ -81,7 +81,7 @@
}
else if(tmpStr.indexOf("#@TestGroupPurpose") >= 0)
{
- arrayData.setGroupPurpose(StripSubstring(tmpStr, "#@TestGroupPurpose"));
+ arrayData.setGroupPurpose(MultipleLines(tmpStr, "#@TestGroupPurpose", fin));
}
else if(tmpStr.indexOf("#@TestSubgroupName") >= 0)
{
@@ -89,7 +89,7 @@
}
else if(tmpStr.indexOf("#@TestSuitePurpose") >= 0)
{
- arrayData.setTestSuitePurpose(StripSubstring(tmpStr, "#@TestSuitePurpose"));
+ arrayData.setTestSuitePurpose(MultipleLines(tmpStr, "#@TestSuitePurpose", fin));
}
else if(tmpStr.indexOf("#@TestSuiteID") >= 0)
{
@@ -175,24 +175,13 @@
}
else if(tmpStr.indexOf("#@TestPurpose") >= 0)
{
- arrayData.setTestPurpose(StripSubstring(tmpStr, "#@TestPurpose"));
+ arrayData.setTestPurpose(MultipleLines(tmpStr, "#@TestPurpose", fin));
}
else if(tmpStr.indexOf("#@TestResult") >= 0)
{
if(fileFormat.startsWith("xml"))
{
- String currTestResult = StripSubstring(tmpStr, "#@TestResult");
- fin.mark(1000);
-
- String oneMoLine = new String(fin.readLine().trim());
- while((oneMoLine.indexOf("#@") < 0) && (oneMoLine.indexOf("-->") < 0))
- {
- currTestResult = currTestResult + " " + oneMoLine;
- oneMoLine = new String(fin.readLine().trim());
- }
-
- arrayData.setTestResult(currTestResult);
- fin.reset();
+ arrayData.setTestResult(MultipleLines(tmpStr, "#@TestResult", fin));
}
else if(fileFormat.startsWith("java"))
{
@@ -248,4 +237,21 @@
return (retStr.trim());
}
+ private String MultipleLines(String tmpStr, String tag, LineNumberReader fin) throws IOException
+ {
+ String currValue = StripSubstring(tmpStr, tag);
+
+ fin.mark(1000);
+
+ String oneMoLine = new String(fin.readLine().trim());
+ while((oneMoLine.indexOf("#@") < 0) && (oneMoLine.indexOf("-->") < 0)) {
+ currValue = currValue + " " + oneMoLine;
+ oneMoLine = new String(fin.readLine().trim());
+ }
+
+ fin.reset();
+
+ return currValue;
+ }
+
}
--
Gitblit v1.10.0