Skip to content

Commit

Permalink
Improved the xpath parsing to handle multi-line xpath statements as m…
Browse files Browse the repository at this point in the history
…ultiple statements when running on any OS. It would previously break when running on Windows.
  • Loading branch information
Chris Chew committed Jul 15, 2010
1 parent af72e7f commit 0e8c035
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -117,7 +117,7 @@ public Object parse(String expectedListOfXpathsAsString) throws Exception {
if ("".equals(expectedListOfXpathsAsString.trim()))
return "no-body";
expStr = Tools.fromHtml(expStr);
String[] nvpArray = expStr.split(System.getProperty("line.separator"));
String[] nvpArray = expStr.split("\r?\n");
for (String nvp : nvpArray) {
if (!"".equals(nvp.trim()))
expectedXPathAsList.add(nvp.trim());
Expand Down
Expand Up @@ -117,7 +117,7 @@ public Object parse(String expectedListOfXpathsAsString) throws Exception {
if ("".equals(expectedListOfXpathsAsString.trim()))
return expectedXPathAsList;
expStr = Tools.fromHtml(expStr);
String[] nvpArray = expStr.split(System.getProperty("line.separator"));
String[] nvpArray = expStr.split("\r?\n");
for (String nvp : nvpArray) {
if (!"".equals(nvp.trim()))
expectedXPathAsList.add(nvp.trim());
Expand Down

0 comments on commit 0e8c035

Please sign in to comment.