diff options
author | Daniel Hahler <git@thequod.de> | 2019-08-30 16:43:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-30 16:43:21 +0200 |
commit | dd025a18c19d5a1a94777d49dc1a18c7ad82473d (patch) | |
tree | 07c4d93872a4468252f5138b78f8cdc562a29564 | |
parent | 1ab442db90ce7223ea406fea1d311c04090d04ce (diff) | |
download | rneovim-dd025a18c19d5a1a94777d49dc1a18c7ad82473d.tar.gz rneovim-dd025a18c19d5a1a94777d49dc1a18c7ad82473d.tar.bz2 rneovim-dd025a18c19d5a1a94777d49dc1a18c7ad82473d.zip |
vim-patch:8.1.0950: using :python sets 'pyxversion' even when not executed (#10891)
Problem: Using :python sets 'pyxversion' even when not executed.
Solution: Check the "skip" flag. (Shane Harper, closes vim/vim#3995)
https://github.com/vim/vim/commit/14816ad6e58336773443f5ee2e4aa9e384af65d2
-rw-r--r-- | src/nvim/testdir/test_python2.vim | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_python3.vim | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_python2.vim b/src/nvim/testdir/test_python2.vim index 7821078045..647290e6b5 100644 --- a/src/nvim/testdir/test_python2.vim +++ b/src/nvim/testdir/test_python2.vim @@ -67,6 +67,14 @@ func Test_vim_function() delfunc s:foo endfunc +func Test_skipped_python_command_does_not_affect_pyxversion() + set pyxversion=0 + if 0 + python import vim + endif + call assert_equal(0, &pyxversion) " This assertion would have failed with Vim 8.0.0251. (pyxversion was introduced in 8.0.0251.) +endfunc + func _SetUpHiddenBuffer() py import vim new diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index f1e8b25454..26aaab31ed 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -67,6 +67,14 @@ func Test_vim_function() delfunc s:foo endfunc +func Test_skipped_python3_command_does_not_affect_pyxversion() + set pyxversion=0 + if 0 + python3 import vim + endif + call assert_equal(0, &pyxversion) " This assertion would have failed with Vim 8.0.0251. (pyxversion was introduced in 8.0.0251.) +endfunc + func _SetUpHiddenBuffer() py3 import vim new |