diff options
Diffstat (limited to 'src/testdir/test_blob.vim')
-rw-r--r-- | src/testdir/test_blob.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testdir/test_blob.vim b/src/testdir/test_blob.vim index 3c1510136a..46b7b0227f 100644 --- a/src/testdir/test_blob.vim +++ b/src/testdir/test_blob.vim @@ -33,6 +33,7 @@ func Test_blob_create() call assert_fails('let b = 0z.') call assert_fails('let b = 0z001122.') call assert_fails('call get("", 1)', 'E896:') + call assert_equal(0, len(test_null_blob())) endfunc " assignment to a blob @@ -100,6 +101,7 @@ func Test_blob_get() call assert_equal(999, get(b, 5, 999)) call assert_equal(-1, get(b, -8)) call assert_equal(999, get(b, -8, 999)) + call assert_equal(10, get(test_null_blob(), 2, 10)) call assert_equal(0x00, b[0]) call assert_equal(0x22, b[2]) @@ -117,6 +119,7 @@ func Test_blob_to_string() call assert_equal('0z00112233', string(b)) call remove(b, 0, 3) call assert_equal('0z', string(b)) + call assert_equal('0z', string(test_null_blob())) endfunc func Test_blob_compare() @@ -251,6 +254,7 @@ func Test_blob_func_remove() call assert_fails("call remove(b, 3, 2)", 'E979:') call assert_fails("call remove(1, 0)", 'E896:') call assert_fails("call remove(b, b)", 'E974:') + call assert_fails("call remove(test_null_blob(), 1, 2)", 'E979:') endfunc func Test_blob_read_write() @@ -313,6 +317,7 @@ func Test_blob_insert() call assert_fails('call insert(b, 0, -20)', 'E475:') call assert_fails('call insert(b, 0, 20)', 'E475:') call assert_fails('call insert(b, [])', 'E745:') + call assert_equal(0, insert(test_null_blob(), 0x33)) endfunc func Test_blob_reverse() @@ -320,6 +325,7 @@ func Test_blob_reverse() call assert_equal(0zBEADDE, reverse(0zDEADBE)) call assert_equal(0zADDE, reverse(0zDEAD)) call assert_equal(0zDE, reverse(0zDE)) + call assert_equal(0z, reverse(test_null_blob())) endfunc func Test_blob_json_encode() |