Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>messages</artifactId>
<version>[19.1.4,29.0.0)</version>
<version>[28.0.1-SNAPSHOT,29.0.0)</version>
</dependency>

<dependency>
Expand Down
6 changes: 4 additions & 2 deletions java/src/main/java/io/cucumber/gherkin/PickleCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ private void compileScenario(List<Pickle> pickles, Scenario scenario, List<Tag>
language,
steps,
pickleTags(scenarioTags),
sourceIds
sourceIds,
scenario.getLocation()
);
pickles.add(pickle);
}
Expand Down Expand Up @@ -174,7 +175,8 @@ private void compileScenarioOutline(List<Pickle> pickles, Scenario scenario, Lis
language,
steps,
pickleTags(tags),
sourceIds
sourceIds,
valuesRow.getLocation()
);

pickles.add(pickle);
Expand Down
4 changes: 2 additions & 2 deletions testdata/good/background.feature.pickles.ndjson
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"pickle":{"astNodeIds":["3"],"id":"8","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"6","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["2"],"id":"7","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/background.feature"}}
{"pickle":{"astNodeIds":["5"],"id":"11","language":"en","name":"also minimalistic","steps":[{"astNodeIds":["0"],"id":"9","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["4"],"id":"10","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/background.feature"}}
{"pickle":{"astNodeIds":["3"],"id":"8","language":"en","location":{"column":3,"line":7},"name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"6","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["2"],"id":"7","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/background.feature"}}
{"pickle":{"astNodeIds":["5"],"id":"11","language":"en","location":{"column":3,"line":10},"name":"also minimalistic","steps":[{"astNodeIds":["0"],"id":"9","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["4"],"id":"10","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/background.feature"}}
8 changes: 4 additions & 4 deletions testdata/good/complex_background.feature.pickles.ndjson
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{"pickle":{"astNodeIds":["3"],"id":"17","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"15","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["2"],"id":"16","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/complex_background.feature"}}
{"pickle":{"astNodeIds":["5"],"id":"20","language":"en","name":"also minimalistic","steps":[{"astNodeIds":["0"],"id":"18","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["4"],"id":"19","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/complex_background.feature"}}
{"pickle":{"astNodeIds":["13","10"],"id":"24","language":"en","name":"with examples","steps":[{"astNodeIds":["0"],"id":"21","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["6"],"id":"22","text":"a rule background step","type":"Context"},{"astNodeIds":["8","10"],"id":"23","text":"the 1 minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/complex_background.feature"}}
{"pickle":{"astNodeIds":["13","11"],"id":"28","language":"en","name":"with examples","steps":[{"astNodeIds":["0"],"id":"25","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["6"],"id":"26","text":"a rule background step","type":"Context"},{"astNodeIds":["8","11"],"id":"27","text":"the 2 minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/complex_background.feature"}}
{"pickle":{"astNodeIds":["3"],"id":"17","language":"en","location":{"column":3,"line":7},"name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"15","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["2"],"id":"16","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/complex_background.feature"}}
{"pickle":{"astNodeIds":["5"],"id":"20","language":"en","location":{"column":3,"line":10},"name":"also minimalistic","steps":[{"astNodeIds":["0"],"id":"18","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["4"],"id":"19","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/complex_background.feature"}}
{"pickle":{"astNodeIds":["13","10"],"id":"24","language":"en","location":{"column":7,"line":23},"name":"with examples","steps":[{"astNodeIds":["0"],"id":"21","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["6"],"id":"22","text":"a rule background step","type":"Context"},{"astNodeIds":["8","10"],"id":"23","text":"the 1 minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/complex_background.feature"}}
{"pickle":{"astNodeIds":["13","11"],"id":"28","language":"en","location":{"column":7,"line":24},"name":"with examples","steps":[{"astNodeIds":["0"],"id":"25","text":"the minimalism inside a background","type":"Context"},{"astNodeIds":["6"],"id":"26","text":"a rule background step","type":"Context"},{"astNodeIds":["8","11"],"id":"27","text":"the 2 minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/complex_background.feature"}}
2 changes: 1 addition & 1 deletion testdata/good/datatables.feature.pickles.ndjson
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"pickle":{"astNodeIds":["13"],"id":"19","language":"en","name":"minimalistic","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":"bar"}]},{"cells":[{"value":"boz"},{"value":"boo"}]}]}},"astNodeIds":["2"],"id":"14","text":"a simple data table","type":"Context"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"}]}]}},"astNodeIds":["4"],"id":"15","text":"a data table with a single cell","type":"Context"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":"bar"},{"value":"boz"}]}]}},"astNodeIds":["6"],"id":"16","text":"a data table with different fromatting","type":"Context"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":""},{"value":"boz"}]}]}},"astNodeIds":["8"],"id":"17","text":"a data table with an empty cell","type":"Context"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":"bar"}]},{"cells":[{"value":"boz"},{"value":"boo"}]},{"cells":[{"value":"boz2"},{"value":"boo2"}]}]}},"astNodeIds":["12"],"id":"18","text":"a data table with comments and newlines inside","type":"Context"}],"tags":[],"uri":"../testdata/good/datatables.feature"}}
{"pickle":{"astNodeIds":["13"],"id":"19","language":"en","location":{"column":3,"line":3},"name":"minimalistic","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":"bar"}]},{"cells":[{"value":"boz"},{"value":"boo"}]}]}},"astNodeIds":["2"],"id":"14","text":"a simple data table","type":"Context"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"}]}]}},"astNodeIds":["4"],"id":"15","text":"a data table with a single cell","type":"Context"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":"bar"},{"value":"boz"}]}]}},"astNodeIds":["6"],"id":"16","text":"a data table with different fromatting","type":"Context"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":""},{"value":"boz"}]}]}},"astNodeIds":["8"],"id":"17","text":"a data table with an empty cell","type":"Context"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":"bar"}]},{"cells":[{"value":"boz"},{"value":"boo"}]},{"cells":[{"value":"boz2"},{"value":"boo2"}]}]}},"astNodeIds":["12"],"id":"18","text":"a data table with comments and newlines inside","type":"Context"}],"tags":[],"uri":"../testdata/good/datatables.feature"}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"pickle":{"astNodeIds":["4"],"id":"7","language":"en","name":"some whitespace is important","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"\nraindrops--\nher last kiss\ngoodbye.\n"}]}]}},"astNodeIds":["1"],"id":"5","text":"3 lines of poetry on 5 lines","type":"Context"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"lost i n space"}]}]}},"astNodeIds":["3"],"id":"6","text":"an example of negative space","type":"Context"}],"tags":[],"uri":"../testdata/good/datatables_with_new_lines.feature"}}
{"pickle":{"astNodeIds":["4"],"id":"7","language":"en","location":{"column":3,"line":3},"name":"some whitespace is important","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"\nraindrops--\nher last kiss\ngoodbye.\n"}]}]}},"astNodeIds":["1"],"id":"5","text":"3 lines of poetry on 5 lines","type":"Context"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"lost i n space"}]}]}},"astNodeIds":["3"],"id":"6","text":"an example of negative space","type":"Context"}],"tags":[],"uri":"../testdata/good/datatables_with_new_lines.feature"}}
16 changes: 8 additions & 8 deletions testdata/good/descriptions.feature.pickles.ndjson
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{"pickle":{"astNodeIds":["1"],"id":"20","language":"en","name":"two lines","steps":[{"astNodeIds":["0"],"id":"19","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["3"],"id":"22","language":"en","name":"without indentation","steps":[{"astNodeIds":["2"],"id":"21","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["5"],"id":"24","language":"en","name":"empty lines in the middle","steps":[{"astNodeIds":["4"],"id":"23","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["7"],"id":"26","language":"en","name":"empty lines around","steps":[{"astNodeIds":["6"],"id":"25","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["9"],"id":"28","language":"en","name":"comment after description","steps":[{"astNodeIds":["8"],"id":"27","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["11"],"id":"30","language":"en","name":"comment right after description","steps":[{"astNodeIds":["10"],"id":"29","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["13"],"id":"32","language":"en","name":"description with escaped docstring separator","steps":[{"astNodeIds":["12"],"id":"31","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["18","16"],"id":"34","language":"en","name":"scenario outline with a description","steps":[{"astNodeIds":["14","16"],"id":"33","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["1"],"id":"20","language":"en","location":{"column":3,"line":4},"name":"two lines","steps":[{"astNodeIds":["0"],"id":"19","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["3"],"id":"22","language":"en","location":{"column":1,"line":9},"name":"without indentation","steps":[{"astNodeIds":["2"],"id":"21","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["5"],"id":"24","language":"en","location":{"column":3,"line":13},"name":"empty lines in the middle","steps":[{"astNodeIds":["4"],"id":"23","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["7"],"id":"26","language":"en","location":{"column":3,"line":19},"name":"empty lines around","steps":[{"astNodeIds":["6"],"id":"25","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["9"],"id":"28","language":"en","location":{"column":3,"line":26},"name":"comment after description","steps":[{"astNodeIds":["8"],"id":"27","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["11"],"id":"30","language":"en","location":{"column":3,"line":33},"name":"comment right after description","steps":[{"astNodeIds":["10"],"id":"29","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["13"],"id":"32","language":"en","location":{"column":3,"line":40},"name":"description with escaped docstring separator","steps":[{"astNodeIds":["12"],"id":"31","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
{"pickle":{"astNodeIds":["18","16"],"id":"34","language":"en","location":{"column":5,"line":52},"name":"scenario outline with a description","steps":[{"astNodeIds":["14","16"],"id":"33","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions.feature"}}
14 changes: 7 additions & 7 deletions testdata/good/descriptions_with_comments.feature.pickles.ndjson
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{"pickle":{"astNodeIds":["1"],"id":"18","language":"en","name":"two lines","steps":[{"astNodeIds":["0"],"id":"17","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["3"],"id":"20","language":"en","name":"without indentation","steps":[{"astNodeIds":["2"],"id":"19","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["5"],"id":"22","language":"en","name":"empty lines in the middle","steps":[{"astNodeIds":["4"],"id":"21","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["7"],"id":"24","language":"en","name":"empty lines around","steps":[{"astNodeIds":["6"],"id":"23","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["12","10"],"id":"26","language":"en","name":"scenario outline with a description","steps":[{"astNodeIds":["8","10"],"id":"25","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["14"],"id":"28","language":"en","name":"scenario with just a comment","steps":[{"astNodeIds":["13"],"id":"27","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["16"],"id":"30","language":"en","name":"scenario with a comment with new lines around","steps":[{"astNodeIds":["15"],"id":"29","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["1"],"id":"18","language":"en","location":{"column":3,"line":7},"name":"two lines","steps":[{"astNodeIds":["0"],"id":"17","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["3"],"id":"20","language":"en","location":{"column":1,"line":14},"name":"without indentation","steps":[{"astNodeIds":["2"],"id":"19","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["5"],"id":"22","language":"en","location":{"column":3,"line":22},"name":"empty lines in the middle","steps":[{"astNodeIds":["4"],"id":"21","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["7"],"id":"24","language":"en","location":{"column":3,"line":29},"name":"empty lines around","steps":[{"astNodeIds":["6"],"id":"23","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["12","10"],"id":"26","language":"en","location":{"column":5,"line":54},"name":"scenario outline with a description","steps":[{"astNodeIds":["8","10"],"id":"25","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["14"],"id":"28","language":"en","location":{"column":3,"line":56},"name":"scenario with just a comment","steps":[{"astNodeIds":["13"],"id":"27","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
{"pickle":{"astNodeIds":["16"],"id":"30","language":"en","location":{"column":3,"line":60},"name":"scenario with a comment with new lines around","steps":[{"astNodeIds":["15"],"id":"29","text":"the minimalism","type":"Context"}],"tags":[],"uri":"../testdata/good/descriptions_with_comments.feature"}}
2 changes: 1 addition & 1 deletion testdata/good/docstrings.feature.pickles.ndjson
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"pickle":{"astNodeIds":["8"],"id":"17","language":"en","name":"minimalistic","steps":[{"argument":{"docString":{"content":"first line (no indent)\n second line (indented with two spaces)\n\nthird line was empty"}},"astNodeIds":["0"],"id":"9","text":"a simple DocString","type":"Context"},{"argument":{"docString":{"content":"<foo>\n <bar />\n</foo>","mediaType":"xml"}},"astNodeIds":["1"],"id":"10","text":"a DocString with content type","type":"Context"},{"argument":{"docString":{"content":"wrongly indented line"}},"astNodeIds":["2"],"id":"11","text":"a DocString with wrong indentation","type":"Context"},{"argument":{"docString":{"content":"first line\nsecond line"}},"astNodeIds":["3"],"id":"12","text":"a DocString with alternative separator","type":"Context"},{"argument":{"docString":{"content":"first line\n\"\"\"\nthird line"}},"astNodeIds":["4"],"id":"13","text":"a DocString with normal separator inside","type":"Context"},{"argument":{"docString":{"content":"first line\n```\nthird line"}},"astNodeIds":["5"],"id":"14","text":"a DocString with alternative separator inside","type":"Context"},{"argument":{"docString":{"content":"first line\n\"\"\"\nthird line"}},"astNodeIds":["6"],"id":"15","text":"a DocString with escaped separator inside","type":"Context"},{"argument":{"docString":{"content":"first line\n```\nthird line"}},"astNodeIds":["7"],"id":"16","text":"a DocString with an escaped alternative separator inside","type":"Context"}],"tags":[],"uri":"../testdata/good/docstrings.feature"}}
{"pickle":{"astNodeIds":["8"],"id":"17","language":"en","location":{"column":3,"line":3},"name":"minimalistic","steps":[{"argument":{"docString":{"content":"first line (no indent)\n second line (indented with two spaces)\n\nthird line was empty"}},"astNodeIds":["0"],"id":"9","text":"a simple DocString","type":"Context"},{"argument":{"docString":{"content":"<foo>\n <bar />\n</foo>","mediaType":"xml"}},"astNodeIds":["1"],"id":"10","text":"a DocString with content type","type":"Context"},{"argument":{"docString":{"content":"wrongly indented line"}},"astNodeIds":["2"],"id":"11","text":"a DocString with wrong indentation","type":"Context"},{"argument":{"docString":{"content":"first line\nsecond line"}},"astNodeIds":["3"],"id":"12","text":"a DocString with alternative separator","type":"Context"},{"argument":{"docString":{"content":"first line\n\"\"\"\nthird line"}},"astNodeIds":["4"],"id":"13","text":"a DocString with normal separator inside","type":"Context"},{"argument":{"docString":{"content":"first line\n```\nthird line"}},"astNodeIds":["5"],"id":"14","text":"a DocString with alternative separator inside","type":"Context"},{"argument":{"docString":{"content":"first line\n\"\"\"\nthird line"}},"astNodeIds":["6"],"id":"15","text":"a DocString with escaped separator inside","type":"Context"},{"argument":{"docString":{"content":"first line\n```\nthird line"}},"astNodeIds":["7"],"id":"16","text":"a DocString with an escaped alternative separator inside","type":"Context"}],"tags":[],"uri":"../testdata/good/docstrings.feature"}}
Loading
Loading