mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Christophe Sovant
04.28.2007 6301c54f54dac5b7eccbe8786e1b98a5e9a3e5e3
Allow to have multiple lines for @TestGroupPurpose, @TestSuitePurpose and @TestPurpose tags
1 files modified
36 ■■■■■ changed files
opends/tests/shared/java/parsingtool/ParseData.java 36 ●●●●● patch | view | raw | blame | history
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;
  }
}