diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-15 22:44:17 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-15 22:44:17 +0100 |
commit | 3d28b58c519c9fc3427587201423c74746cc219e (patch) | |
tree | 88d28470a3b7ac35a42521621745ace86598b89a /src/testdir/test_blob.vim | |
parent | 2ea773b468a1143214c2f12b91ab5e1e7abb4a14 (diff) | |
download | vim-git-3d28b58c519c9fc3427587201423c74746cc219e.tar.gz |
patch 8.1.0756: copy() does not make a copy of a Blobv8.1.0756
Problem: copy() does not make a copy of a Blob.
Solution: Make a copy.
Diffstat (limited to 'src/testdir/test_blob.vim')
-rw-r--r-- | src/testdir/test_blob.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_blob.vim b/src/testdir/test_blob.vim index 3eeb3d2f3..d5f682f54 100644 --- a/src/testdir/test_blob.vim +++ b/src/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') |