vim-ruby-debugger
vim-ruby-debugger copied to clipboard
Unable to run tests on Windows
I wrote a patch (modified autoload/ruby_debugger.vim) to make debugging RSpec tests work, as there was an issue with the get_escaped_absolute_path(command) method in ruby_debugger.vim. I assume this will also work for Cucumber features and Unit::Test but I want to run the vim-ruby-debugger unit tests to confirm. However, when I try to run them on Windows I get the following error:
E121: Undefined variable: g:TU
By the way, the patch is replacing the following lines (around line 111) with my changes.
Original (line 111 of autoload/ruby_debugger.vim) if given_path[0] == '/' let absolute_path = given_path
Updated: let is_windows = (has("win32") || has("win64")) let is_windows_start_path = (given_path =~ '' || given_path =~ '^\w:(|/)') let is_windows_absolute_path = is_windows && is_windows_start_path if given_path[0] == '/' || is_windows_absolute_path let absolute_path = given_path
This change will have to be applied to both autoload/ruby_debugger.vim and additionals/ruby_debugger.vim (as its the file that declares the g:TU variable). I can't quite figure out why running the vim-ruby-debugger test cases isn't working...
Oh, great! I actually even don't have Windows now, and I can't check it. Could you please create a pull request with that patch for me (or maybe even a git patch)?
And about undefined variable - g:TU - run :Rdebugger first, to load autoload/ruby_debugger.vim. An then - call g:TU.run().