- Revision
- 1656
- Author
- mauro
- Date
- 2010-06-03 18:12:52 -0500 (Thu, 03 Jun 2010)
Log Message
JBEHAVE-297: Support newlines in comma-separated lists of paths.
Modified Paths
Diff
Modified: trunk/core/jbehave-core/src/behaviour/java/org/jbehave/scenario/parser/PatternScenarioParserBehaviour.java (1655 => 1656)
--- trunk/core/jbehave-core/src/behaviour/java/org/jbehave/scenario/parser/PatternScenarioParserBehaviour.java 2010-05-25 23:05:32 UTC (rev 1655) +++ trunk/core/jbehave-core/src/behaviour/java/org/jbehave/scenario/parser/PatternScenarioParserBehaviour.java 2010-06-03 23:12:52 UTC (rev 1656) @@ -295,7 +295,7 @@ public void shouldParseStoryWithGivenScenarios() { String wholeStory = "Scenario: A scenario with given scenarios" + NL + NL + - "GivenScenarios: path/to/one,path/to/two" + NL + NL + + "GivenScenarios: path/to/one , "+ NL + " path/to/two" + NL + NL + "Given a step with a <one>" + NL + "When I run the scenario of name <two>" + NL + "Then I should see <three> in the output";
Modified: trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/PatternScenarioParser.java (1655 => 1656)
--- trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/PatternScenarioParser.java 2010-05-25 23:05:32 UTC (rev 1655) +++ trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/PatternScenarioParser.java 2010-06-03 23:12:52 UTC (rev 1656) @@ -206,7 +206,7 @@ String givenScenarios = keywords.givenScenarios(); String concatenatedKeywords = concatenateWithOr(keywords.given(), keywords.when(), keywords.then(), keywords.others()); - return compile(".*"+givenScenarios+"(.*?)\\s*(" + concatenatedKeywords + ").*"); + return compile(".*"+givenScenarios+"((.|\\n)*?)\\s*(" + concatenatedKeywords + ").*"); } private Pattern patternToPullExamplesTableIntoGroupOne() {
To unsubscribe from this list please visit:
