diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-01-31 18:45:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-01-31 18:45:24 +0100 |
commit | 155500077c80cdb5d9c63996000c011b66a676bf (patch) | |
tree | 4af4b56ec06197b39241f8f734a71dd99411efd0 /src/testdir | |
parent | 448a22549b4528fd81d520497f30672567199c96 (diff) | |
download | vim-155500077c80cdb5d9c63996000c011b66a676bf.zip |
patch 7.4.1228
Problem: copy() and deepcopy() fail with special variables. (Nikolai
Pavlov)
Solution: Make it work. Add a test. Closes #614.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_viml.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_viml.vim b/src/testdir/test_viml.vim index f7b34146a..6c755bb53 100644 --- a/src/testdir/test_viml.vim +++ b/src/testdir/test_viml.vim @@ -1001,6 +1001,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)) |