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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user