tpope / vim-rails

rails.vim: Ruby on Rails power tools
http://www.vim.org/scripts/script.php?script_id=1567
4.1k stars 383 forks source link

Convert test related regexes from greedy to lazy #475

Closed teoljungberg closed 7 years ago

teoljungberg commented 7 years ago

This commit changes the regexes in s:readable_test_file_candidates from being greedy to lazy. This will allow a namespace such as app/controllers/app/v1/... to be defined and not have any side effects such as the test file not being found.

References #474

tpope commented 7 years ago

These regexes aren't greedy, so I'm confused what this accomplishes. I see a couple of typos, and I suspect one of those is solving your issue by breaking the regex entirely. Can you isolate which line change actually solves your issue?

teoljungberg commented 7 years ago

You're absolutely right, it broke more than it resolved the issue at hand. (It did break almost everything).

After some echoerr debugging, I am none the wiser on how to resolve this issue. Any help would be highly appreciated!

teoljungberg commented 7 years ago

I cannot figure out how to resolve this issue, so I'm closing this PR but leaving the issue open.