aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-07 05:34:20 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-02-07 05:34:20 +0800
commite6e9ffb3456607747132e398039ea8de16553a52 (patch)
tree8f77d8c40cf0d170b30c453684cc882441ebcd44
parenta937fc53ef3652b81be247d8ddad091652327a71 (diff)
downloadrneovim-e6e9ffb3456607747132e398039ea8de16553a52.tar.gz
rneovim-e6e9ffb3456607747132e398039ea8de16553a52.tar.bz2
rneovim-e6e9ffb3456607747132e398039ea8de16553a52.zip
vim-patch:7.4.1228
Problem: copy() and deepcopy() fail with special variables. (Nikolai Pavlov) Solution: Make it work. Add a test. Closes vim/vim#614. https://github.com/vim/vim/commit/155500077c80cdb5d9c63996000c011b66a676bf Code is N/A. This only ports the tests. Comment out tests involving v:none as Nvim has removed it.
-rw-r--r--src/nvim/testdir/test_vimscript.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_vimscript.vim b/src/nvim/testdir/test_vimscript.vim
index 0d9aa647fd..a8c0c941c3 100644
--- a/src/nvim/testdir/test_vimscript.vim
+++ b/src/nvim/testdir/test_vimscript.vim
@@ -1208,6 +1208,16 @@ func Test_type()
" call assert_equal(v:none, eval(string(v:none)))
call assert_equal(v:null, eval(string(v:null)))
+ call assert_equal(v:false, copy(v:false))
+ call assert_equal(v:true, copy(v:true))
+ " call assert_equal(v:none, copy(v:none))
+ call assert_equal(v:null, copy(v:null))
+
+ call assert_equal([v:false], deepcopy([v:false]))
+ call assert_equal([v:true], deepcopy([v:true]))
+ " call assert_equal([v:none], deepcopy([v:none]))
+ call assert_equal([v:null], deepcopy([v:null]))
+
call assert_true(empty(v:false))
call assert_false(empty(v:true))
call assert_true(empty(v:null))