summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_blob.vim
diff options
context:
space:
mode:
authorBakudankun <bakudankun@gmail.com>2022-09-09 18:46:47 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-09 18:46:47 +0100
commit375141e1f80dced9be738568a3418f65813f4a2f (patch)
treebe23086bf0c21bbf564b42298909d856ac6780cf /src/testdir/test_blob.vim
parent0adae2da17598669e442ba38547ab18a6c1406de (diff)
patch 9.0.0430: cannot use repeat() with a blobv9.0.0430
Problem: Cannot use repeat() with a blob. Solution: Implement blob repeat. (closes #11090)
Diffstat (limited to 'src/testdir/test_blob.vim')
-rw-r--r--src/testdir/test_blob.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_blob.vim b/src/testdir/test_blob.vim
index 46370c4749..b0239fd610 100644
--- a/src/testdir/test_blob.vim
+++ b/src/testdir/test_blob.vim
@@ -725,6 +725,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()
" blob variable