diff options
Diffstat (limited to 'src/testdir/test_vim9_builtin.vim')
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index eb36bd77a1..cb36990657 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -531,6 +531,7 @@ def Test_getreg() var lines = ['aaa', 'bbb', 'ccc'] setreg('a', lines) getreg('a', true, true)->assert_equal(lines) + assert_fails('getreg("ab")', 'E1162:') enddef def Test_getreg_return_type() @@ -539,6 +540,20 @@ def Test_getreg_return_type() var s3: list<string> = getreg('"', 1, 1) enddef +def Test_getreginfo() + var text = 'abc' + setreg('a', text) + getreginfo('a')->assert_equal({regcontents: [text], regtype: 'v', isunnamed: false}) + assert_fails('getreginfo("ab")', 'E1162:') +enddef + +def Test_getregtype() + var lines = ['aaa', 'bbb', 'ccc'] + setreg('a', lines) + getregtype('a')->assert_equal('V') + assert_fails('getregtype("ab")', 'E1162:') +enddef + def Test_glob() glob('runtest.vim', true, true, true)->assert_equal(['runtest.vim']) enddef @@ -878,6 +893,7 @@ def Test_setreg() var reginfo = getreginfo('a') setreg('a', reginfo) getreginfo('a')->assert_equal(reginfo) + assert_fails('setreg("ab", 0)', 'E1162:') enddef def Test_slice() |