1
0
forked from aniani/vim

patch 9.0.0936: wrong type for "isunnamed" returned by getreginfo()

Problem:    Wrong type for "isunnamed" returned by getreginfo().
Solution:   Use VAR_BOOL instead of VAR_SPECIAL. (closes #11598)
This commit is contained in:
Bram Moolenaar
2022-11-24 11:31:29 +00:00
parent 24482fbfd5
commit 82946e1439
3 changed files with 10 additions and 1 deletions

View File

@@ -520,6 +520,13 @@ func Test_get_reginfo()
nunmap <F2>
unlet g:RegInfo
" The type of "isunnamed" was VAR_SPECIAL but should be VAR_BOOL. Can only
" be noticed when using json_encod().
call setreg('a', 'foo')
let reginfo = getreginfo('a')
let expected = #{regcontents: ['foo'], isunnamed: v:false, regtype: 'v'}
call assert_equal(json_encode(expected), json_encode(reginfo))
bwipe!
endfunc