mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
fix(eval): add the vimscript-1 feature to has()
Include Test_string_concat_scriptversion1 to test that has('vimscript-1') works (excluding the :scriptversion 1 bit).
This commit is contained in:
parent
29bc648d2b
commit
18b32fca67
@ -4403,6 +4403,7 @@ static void f_has(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
|||||||
"user_commands",
|
"user_commands",
|
||||||
"vartabs",
|
"vartabs",
|
||||||
"vertsplit",
|
"vertsplit",
|
||||||
|
"vimscript-1",
|
||||||
"virtualedit",
|
"virtualedit",
|
||||||
"visual",
|
"visual",
|
||||||
"visualextra",
|
"visualextra",
|
||||||
|
@ -138,6 +138,31 @@ func Test_let_errmsg()
|
|||||||
let v:errmsg = ''
|
let v:errmsg = ''
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" scriptversion 1
|
||||||
|
func Test_string_concat_scriptversion1()
|
||||||
|
call assert_true(has('vimscript-1'))
|
||||||
|
let a = 'a'
|
||||||
|
let b = 'b'
|
||||||
|
|
||||||
|
echo a . b
|
||||||
|
let a .= b
|
||||||
|
let vers = 1.2.3
|
||||||
|
call assert_equal('123', vers)
|
||||||
|
|
||||||
|
if has('float')
|
||||||
|
call assert_fails('let f = .5', 'E15:')
|
||||||
|
endif
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
" scriptversion 1
|
||||||
|
func Test_vvar_scriptversion1()
|
||||||
|
call assert_equal(15, 017)
|
||||||
|
call assert_equal(15, 0o17)
|
||||||
|
call assert_equal(15, 0O17)
|
||||||
|
call assert_equal(18, 018)
|
||||||
|
call assert_equal(511, 0o777)
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_number_max_min_size()
|
func Test_number_max_min_size()
|
||||||
" This will fail on systems without 64 bit number support or when not
|
" This will fail on systems without 64 bit number support or when not
|
||||||
" configured correctly.
|
" configured correctly.
|
||||||
|
Loading…
Reference in New Issue
Block a user