File tree 2 files changed +4
-2
lines changed
core/src/main/java/cucumber/runtime/snippets
java/src/test/java/cucumber/runtime/java
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ public class SnippetGenerator {
24
24
Pattern .compile ("\\ ]" ),
25
25
Pattern .compile ("\\ ?" ),
26
26
Pattern .compile ("\\ *" ),
27
+ Pattern .compile ("\\ +" ),
28
+ Pattern .compile ("\\ ." ),
27
29
Pattern .compile ("\\ ^" ),};
28
30
29
31
private static final String REGEXP_HINT = "Express the Regexp above with the code you wish you had" ;
Original file line number Diff line number Diff line change @@ -90,12 +90,12 @@ public void generatesSnippetWithEscapedQuestionMarks() {
90
90
@ Test
91
91
public void generatesSnippetWithLotsOfEscapes () {
92
92
String expected = "" +
93
- "@Given(\" ^\\ \\ ^\\ \\ (\\ \\ [a-z\\ \\ ]\\ \\ *\\ \\ )\\ \\ ?\\ \\ $$\" )\n " +
93
+ "@Given(\" ^\\ \\ ^\\ \\ (\\ \\ [a-z\\ \\ ]\\ \\ *\\ \\ )\\ \\ ?\\ \\ . \\ \\ + \\ \\ $$\" )\n " +
94
94
"public void _a_z_$() throws Throwable {\n " +
95
95
" // Express the Regexp above with the code you wish you had\n " +
96
96
" throw new PendingException();\n " +
97
97
"}\n " ;
98
- assertEquals (expected , snippetFor ("^([a-z]*)?$" ));
98
+ assertEquals (expected , snippetFor ("^([a-z]*)?.+ $" ));
99
99
}
100
100
101
101
@ Test
You can’t perform that action at this time.
0 commit comments