Skip to content

Commit

Permalink
Partial fix for cucumber-attic#149. Passes on Ruby/C, but fails on Ja…
Browse files Browse the repository at this point in the history
…va. Needs more investigation.
  • Loading branch information
aslakhellesoy committed Nov 23, 2011
1 parent 6f5cddf commit 105706b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ragel/lexer_common.rl.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
ScenarioOutlineHeading = space* I18N_ScenarioOutline %begin_content ^ScenarioOutlineHeadingEnd* :>> ScenarioOutlineHeadingEnd @store_scenario_outline_content;
ExamplesHeading = space* I18N_Examples %begin_content ^ExamplesHeadingEnd* :>> ExamplesHeadingEnd @store_examples_content;

Step = space* I18N_Step %begin_content ^EOL+ %store_step_content :> EOL+;
Step = space* I18N_Step %begin_content ^EOL* %store_step_content :> EOL+;
Comment = space* '#' >begin_content ^EOL* %store_comment_content :> EOL+;

Tag = ( ('@' [^@\r\n\t ]+) >begin_content ) %store_tag_content;
Expand Down
8 changes: 8 additions & 0 deletions spec/gherkin/shared/lexer_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,14 @@ def scan(gherkin)
[:eof]
]
end

it "should parse steps with an empty name" do
scan("Given ")
@listener.to_sexp.should == [
[:step, "Given ", "", 1],
[:eof]
]
end
end

describe "A single feature, single scenario, single step" do
Expand Down

0 comments on commit 105706b

Please sign in to comment.