mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.2262: Vim9: converting bool to string prefixes v:
Problem: Vim9: converting bool to string prefixes v:. Solution: Do not use the v: prefix.
This commit is contained in:
parent
d5ea8f08f7
commit
a8b8af19e4
@ -2068,8 +2068,8 @@ get_var_special_name(int nr)
|
||||
{
|
||||
switch (nr)
|
||||
{
|
||||
case VVAL_FALSE: return "v:false";
|
||||
case VVAL_TRUE: return "v:true";
|
||||
case VVAL_FALSE: return in_vim9script() ? "false" : "v:false";
|
||||
case VVAL_TRUE: return in_vim9script() ? "true" : "v:true";
|
||||
case VVAL_NONE: return "v:none";
|
||||
case VVAL_NULL: return "v:null";
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ def Test_disassemble_push()
|
||||
var res = execute('disass s:ScriptFuncPush')
|
||||
assert_match('<SNR>\d*_ScriptFuncPush.*' ..
|
||||
'localbool = true.*' ..
|
||||
' PUSH v:true.*' ..
|
||||
' PUSH true.*' ..
|
||||
'localspec = v:none.*' ..
|
||||
' PUSH v:none.*' ..
|
||||
'localblob = 0z1234.*' ..
|
||||
@ -1461,7 +1461,7 @@ def Test_disassemble_invert_bool()
|
||||
var instr = execute('disassemble InvertBool')
|
||||
assert_match('InvertBool\_s*' ..
|
||||
'var flag = true\_s*' ..
|
||||
'\d PUSH v:true\_s*' ..
|
||||
'\d PUSH true\_s*' ..
|
||||
'\d STORE $0\_s*' ..
|
||||
'var invert = !flag\_s*' ..
|
||||
'\d LOAD $0\_s*' ..
|
||||
|
@ -1056,14 +1056,19 @@ def Test_expr5()
|
||||
assert_equal('123 hello', 123 .. ' hello')
|
||||
assert_equal('123456', 123 .. 456)
|
||||
|
||||
assert_equal('av:true', 'a' .. true)
|
||||
assert_equal('av:false', 'a' .. false)
|
||||
assert_equal('atrue', 'a' .. true)
|
||||
assert_equal('afalse', 'a' .. false)
|
||||
assert_equal('av:null', 'a' .. v:null)
|
||||
assert_equal('av:none', 'a' .. v:none)
|
||||
if has('float')
|
||||
assert_equal('a0.123', 'a' .. 0.123)
|
||||
endif
|
||||
|
||||
set digraph
|
||||
assert_equal('val: true', 'val: ' .. &digraph)
|
||||
set nodigraph
|
||||
assert_equal('val: false', 'val: ' .. &digraph)
|
||||
|
||||
assert_equal([1, 2, 3, 4], [1, 2] + [3, 4])
|
||||
assert_equal(0z11223344, 0z1122 + 0z3344)
|
||||
assert_equal(0z112201ab, 0z1122
|
||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2262,
|
||||
/**/
|
||||
2261,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user