Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Buggy pretty formatting for Scenario Outlines #146

Open
aslakhellesoy opened this issue Nov 16, 2011 · 0 comments
Open

Buggy pretty formatting for Scenario Outlines #146

aslakhellesoy opened this issue Nov 16, 2011 · 0 comments

Comments

@aslakhellesoy
Copy link
Contributor

This is when using Cucumber-JVM:

Scenario Outline: This is an example of a scenario outline
  Given this is a scenario outline
  When we concatenate <string_1> with <string_2>
  Then the combined string is <string_3>

  Examples:
    |string_1 | string_2 | string_3    |
    | hello   | world    | hello world |

Stack trace:

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
        at java.util.regex.Matcher.reset(Matcher.java:291)
        at java.util.regex.Matcher.<init>(Matcher.java:211)
        at java.util.regex.Pattern.matcher(Pattern.java:888)
        at gherkin.formatter.PrettyFormatter.indent(PrettyFormatter.java:363)
        at gherkin.formatter.PrettyFormatter.printDescription(PrettyFormatter.java:355)
        at gherkin.formatter.PrettyFormatter.printStatement(PrettyFormatter.java:111)
        at gherkin.formatter.PrettyFormatter.match(PrettyFormatter.java:149)
        at cucumber.runtime.World.runStep(World.java:76)
        at cucumber.runtime.model.CucumberScenario.runStep(CucumberScenario.java:68)
        at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:46)
        at cucumber.runtime.model.CucumberScenarioOutline.run(CucumberScenarioOutline.java:38)
        at cucumber.runtime.Runtime.run(Runtime.java:101)
        at cucumber.runtime.Runtime.run(Runtime.java:93)
        at cucumber.cli.Main.run(Main.java:77)
        at cucumber.cli.Main.main(Main.java:63)
        ... 6 more
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant