Conversation
Contributor
Author
|
Note to self: this trivial fix does not seem to work, the tests never finish with this change. diff --git a/suite.go b/suite.go
index 261ed28..04026a7 100644
--- a/suite.go
+++ b/suite.go
@@ -180,7 +180,8 @@ func (s *suite) runStep(ctx context.Context, pickle *Scenario, step *Step, prevS
return ctx, nil
}
- ctx, err = s.maybeSubSteps(match.Run(ctx))
+ r1, r2 := match.Run(ctx)
+ ctx, err = s.maybeSubSteps(r1, r2, pickle)
return ctx, err
}
@@ -332,7 +333,7 @@ func (s *suite) maybeUndefined(ctx context.Context, text string, arg interface{}
return ctx, undefined, nil
}
-func (s *suite) maybeSubSteps(ctx context.Context, result interface{}) (context.Context, error) {
+func (s *suite) maybeSubSteps(ctx context.Context, result interface{}, pickle *Scenario) (context.Context, error) {
if nil == result {
return ctx, nil
}
@@ -349,9 +350,7 @@ func (s *suite) maybeSubSteps(ctx context.Context, result interface{}) (context.
var err error
for _, text := range steps {
- if def := s.matchStepText(text); def == nil {
- return ctx, ErrUndefined
- } else if ctx, err = s.maybeSubSteps(def.Run(ctx)); err != nil {
+ if ctx, err = s.runStep(ctx, pickle, &Step{Text: text}, nil, false, false); err != nil {
return ctx, fmt.Errorf("%s: %+v", text, err)
}
} |
This demonstrates the bug reported in #486
baa1e33 to
11f00d8
Compare
Go API Changes# github.com/cucumber/godog ## compatible changes Feature: added # summary Inferred base version: v0.12.5 Suggested version: v0.13.0 |
Member
|
@wichert old but is this still needed? |
Contributor
Author
|
The project where I needed this has been abandoned, so I personally no longer need this. I do still feel that this is a bug that should be fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR will try to fix #486. Currently still work-in-progress.
📋 Checklist: