From c65dd2d114b8a493b05e8b570a5dff6f696acd9c Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 15 Sep 2019 07:11:00 -0400 Subject: [PATCH 1/2] vim-patch:8.1.0220: Ruby converts v:true and v:false to a number Problem: Ruby converts v:true and v:false to a number. Solution: Use Qtrue and Qfalse instead. (Masataka Pocke Kuwabara, closes vim/vim#3259) https://github.com/vim/vim/commit/d84b26a03b13cd816d80ff32b61e8de740d499ce nvim does not support v:none. --- src/nvim/testdir/test_ruby.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nvim/testdir/test_ruby.vim b/src/nvim/testdir/test_ruby.vim index ef1a2d25b7..64199570a9 100644 --- a/src/nvim/testdir/test_ruby.vim +++ b/src/nvim/testdir/test_ruby.vim @@ -34,6 +34,14 @@ func Test_ruby_evaluate_dict() call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n")) endfunc +func Test_ruby_evaluate_special_var() + let l = [v:true, v:false, v:null] + redir => l:out + ruby d = Vim.evaluate("l"); print d + redir END + call assert_equal(['[true, false, nil]'], split(l:out, "\n")) +endfunc + func Test_rubydo() throw 'skipped: TODO: ' " Check deleting lines does not trigger ml_get error. From 36a167015145b46bc043daac2d06c3dc5f8b8dbb Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 15 Sep 2019 07:32:34 -0400 Subject: [PATCH 2/2] test/old: detect user modules for python,ruby Set the environment variables before changing $HOME so that python,ruby can find user modules not in $HOME. Reference: - https://github.com/neovim/neovim/commit/7be7ec98a22451ec75ce5eb9284fa1722b53c697 - https://github.com/neovim/neovim/issues/10270#issuecomment-531516948 --- src/nvim/testdir/setup.vim | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim index f79fb9e518..ea28f328ae 100644 --- a/src/nvim/testdir/setup.vim +++ b/src/nvim/testdir/setup.vim @@ -31,12 +31,6 @@ let &packpath = &rtp " Avoid storing shell history. let $HISTFILE = "" -" Make sure $HOME does not get read or written. -let $HOME = expand(getcwd() . '/XfakeHOME') -if !isdirectory($HOME) - call mkdir($HOME) -endif - " Use default shell on Windows to avoid segfault, caused by TUI if has('win32') let $SHELL = '' @@ -45,3 +39,15 @@ if has('win32') set shellcmdflag=/s/c shellxquote=\" shellredir=>%s\ 2>&1 let &shellpipe = &shellredir endif + +" Detect user modules for language providers +let $PYTHONUSERBASE = $HOME . '/.local' +if executable('gem') + let $GEM_PATH = system('gem env gempath') +endif + +" Make sure $HOME does not get read or written. +let $HOME = expand(getcwd() . '/XfakeHOME') +if !isdirectory($HOME) + call mkdir($HOME) +endif