Closed kieran-ryan closed 10 months ago
Behaviour of cucumber-rs
from Anything particular you want feedback on?
has been validated with great help from @tyranron - thank you - see cucumber-rs/cucumber#319.
A rust step definition pattern containing trailing whitespace cannot match a gherkin test step as the gherkin parser strips trailing whitespace. Modifying cucumber-rs
to explicitly inform the user of how to fix such cases is a possibility through a pull request. These cases are thus appropriately accounted for in the unit tests of this pull request.
#[given("a line continuation \
")]
fn hungry_cat(world: &mut AnimalWorld) {
world.cat.hungry = true;
}
🤔 What's changed?
Support line continuation characters for step definition patterns written in rust.
⚡️ What's your motivation?
Fixes cucumber/vscode#116.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
What gherkin text will match the below step definition pattern where there are characters on the line after the line continuation?
cucumber-rs
does not throw any error for this pattern; however, was unable to find a matching gherkin test step.📋 Checklist: