tpope / vim-cucumber

Vim Cucumber runtime files

Home Page:http://www.vim.org/scripts/script.php?script_id=2973

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect error display for Cucumber

czak opened this issue · comments

I'm using :compiler cucumber + :make (or :Make with vim-dispatch) to run my cukes.
For some reason, a successful pass will always be shown as having an error:

Feature: Success

  Scenario: Success     # features/success.feature:2
    When I do something # features/steps.rb:1
    Then I succeed      # features/steps.rb:4

1 scenario (<<< THIS LINE MARKED AS ERROR)
2 steps
0m0.016s

See demo below:

cucumber-incorrect-errors

I'm using MacVim snapshot 73 (VIM 7.4.258) with bundled cucumber.vim compiler matching this one here.

Other compilers - e.g. rspec - work fine and only mark errors where there are any.

Any idea why this is happening?

What is :verbose set efm??

errorformat=%W%m (Cucumber::Undefined),%E%m (%.%#),%Z%f:%l,%Z%f:%l:%.%#
      Last set from ~/.vim/bundle/vim-dispatch/autoload/dispatch.vim

Tried the same after removing vim-dispatch from my bundle.
Incorrect behavior with cucumber remains.

errorformat=%W%m (Cucumber::Undefined),%E%m (%.%#),%Z%f:%l,%Z%f:%l:%.%#

(no "Last set from..." line this time)

What does the plain output of cucumber look like?

$ cucumber
Feature: Success

  Scenario: Success     # features/success.feature:2
    When I do something # features/steps.rb:1
    Then I succeed      # features/steps.rb:4

1 scenario (1 passed)
2 steps (2 passed)
0m0.010s
  • inside Vim, the "incorrect" line says 1 scenario
  • in Bash, the line says 1 scenario (1 passed)

Works great, thanks a lot!