aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2020-11-25 16:21:00 +0000
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-15 21:54:00 +0100
commit2b98bdd75b7ffc8c876d1e03c96a4edc4c1e1b12 (patch)
treefa4ebe55bdea5b70344e312210a54d2be9b16563 /src/nvim/testdir
parentc1b8731ece81cdbc43fbb6050eaf12e84abdc4b0 (diff)
downloadrneovim-2b98bdd75b7ffc8c876d1e03c96a4edc4c1e1b12.tar.gz
rneovim-2b98bdd75b7ffc8c876d1e03c96a4edc4c1e1b12.tar.bz2
rneovim-2b98bdd75b7ffc8c876d1e03c96a4edc4c1e1b12.zip
vim-patch:8.1.0756: copy() does not make a copy of a Blob
Problem: copy() does not make a copy of a Blob. Solution: Make a copy. https://github.com/vim/vim/commit/3d28b58c519c9fc3427587201423c74746cc219e Replace vim_memsave() with xmemdup().
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_blob.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_blob.vim b/src/nvim/testdir/test_blob.vim
index 5bee25a0a2..b2b5ddcfd6 100644
--- a/src/nvim/testdir/test_blob.vim
+++ b/src/nvim/testdir/test_blob.vim
@@ -112,7 +112,14 @@ func Test_blob_compare()
call assert_false(b1 is b2)
let b2 = b1
+ call assert_true(b1 == b2)
call assert_true(b1 is b2)
+ let b2 = copy(b1)
+ call assert_true(b1 == b2)
+ call assert_false(b1 is b2)
+ let b2 = b1[:]
+ call assert_true(b1 == b2)
+ call assert_false(b1 is b2)
call assert_fails('let x = b1 > b2')
call assert_fails('let x = b1 < b2')