diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-02-28 21:07:56 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2023-02-28 21:27:43 +0800 |
| commit | 278aeee3aed753d1084597378e653395bd472c42 (patch) | |
| tree | 4790d7d0eb363611d524dad5b09e2687bec2a1ec /src/nvim/testdir | |
| parent | 1e513fd112767e57f2b39dfaa395c83cb4f6a9f7 (diff) | |
| download | rneovim-278aeee3aed753d1084597378e653395bd472c42.tar.gz rneovim-278aeee3aed753d1084597378e653395bd472c42.tar.bz2 rneovim-278aeee3aed753d1084597378e653395bd472c42.zip | |
vim-patch:9.0.0430: cannot use repeat() with a blob
Problem: Cannot use repeat() with a blob.
Solution: Implement blob repeat. (closes vim/vim#11090)
https://github.com/vim/vim/commit/375141e1f80dced9be738568a3418f65813f4a2f
Co-authored-by: Bakudankun <bakudankun@gmail.com>
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_blob.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_blob.vim b/src/nvim/testdir/test_blob.vim index 310582240c..2c145f2019 100644 --- a/src/nvim/testdir/test_blob.vim +++ b/src/nvim/testdir/test_blob.vim @@ -715,6 +715,18 @@ func Test_blob2string() call assert_equal(v, string(b)) endfunc +func Test_blob_repeat() + call assert_equal(0z, repeat(0z00, 0)) + call assert_equal(0z00, repeat(0z00, 1)) + call assert_equal(0z0000, repeat(0z00, 2)) + call assert_equal(0z00000000, repeat(0z0000, 2)) + + call assert_equal(0z, repeat(0z12, 0)) + call assert_equal(0z, repeat(0z1234, 0)) + call assert_equal(0z1234, repeat(0z1234, 1)) + call assert_equal(0z12341234, repeat(0z1234, 2)) +endfunc + " Test for blob allocation failure func Test_blob_alloc_failure() CheckFunction test_alloc_fail |