Mercurial > vim
diff src/testdir/test_registers.vim @ 24695:13efbfc53054 v8.2.2886
patch 8.2.2886: various pieces of code not covered by tests
Commit: https://github.com/vim/vim/commit/34fcb697240c1bc9e69417ed75db3b1a83479724
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue May 25 20:14:00 2021 +0200
patch 8.2.2886: various pieces of code not covered by tests
Problem: Various pieces of code not covered by tests.
Solution: Add a few more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/8255)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 25 May 2021 20:15:03 +0200 |
parents | 72e9b861bc92 |
children | b1440083f0da |
line wrap: on
line diff
--- a/src/testdir/test_registers.vim +++ b/src/testdir/test_registers.vim @@ -281,6 +281,7 @@ endfunc func Test_set_register() call assert_fails("call setreg('#', 200)", 'E86:') + call assert_fails("call setreg('a', test_unknown())", 'E908:') edit Xfile_alt_1 let b1 = bufnr('') @@ -470,6 +471,14 @@ func Test_get_reginfo() let info = getreginfo('"') call assert_equal('z', info.points_to) + let @a="a1b2" + nnoremap <F2> <Cmd>let g:RegInfo = getreginfo()<CR> + exe "normal \"a\<F2>" + call assert_equal({'regcontents': ['a1b2'], 'isunnamed': v:false, + \ 'regtype': 'v'}, g:RegInfo) + nunmap <F2> + unlet g:RegInfo + bwipe! endfunc