Mercurial > vim
diff src/testdir/test_blob.vim @ 15496:f1c33409e908 v8.1.0756
patch 8.1.0756: copy() does not make a copy of a Blob
commit https://github.com/vim/vim/commit/3d28b58c519c9fc3427587201423c74746cc219e
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 15 22:44:17 2019 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 15 Jan 2019 22:45:05 +0100 |
parents | 74a8f44b5322 |
children | 99a4cc4782ac |
line wrap: on
line diff
--- 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')