cucumber / godog

Cucumber for golang
MIT License
2.32k stars 256 forks source link

crash when run rule example in gherkin reference #490

Open longbai opened 2 years ago

longbai commented 2 years ago

👓 What did you see?

run below feature crah https://cucumber.io/docs/gherkin/reference/#keywords `Feature: Highlander

Rule: There can be only One

Example: Only One -- More than one alive
  Given there are 3 ninjas
  And there are more than one ninja alive
  When 2 ninjas meet, they will fight
  Then one ninja dies (but not me)
  And there is one ninja less alive

Example: Only One -- One alive
  Given there is only 1 ninja alive
  Then he (or she) will live forever ;-)`

`Feature: Highlander panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x1195855]

goroutine 1 [running]: github.com/cucumber/godog/internal/formatters.(*Pretty).printStep(0xc000012b80, 0xc0002e8090, 0xc0002b8680) /Users/long/go/pkg/mod/github.com/cucumber/godog@v0.12.5/internal/formatters/fmt_pretty.go:384 +0x6d5`

✅ What did you expect to see?

no crash

no crash

📦 Which tool/library version are you using?

0.12.5

🔬 How could we reproduce it?

Steps to reproduce the behavior:

  1. Install '...' version '...'
  2. Create a file called '....'
  3. Run command '....'
  4. See error '....'

📚 Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

dumpsterfireproject commented 2 years ago

This was fixed when PR 480 was merged - https://github.com/cucumber/godog/pull/480. It should be included in the next release.