mirror of
https://github.com/neovim/neovim.git
synced 2026-04-01 05:12:02 +00:00
vim-patch:9.1.1967: if_python: 64bit numbers truncated (#37245)
Problem: if_python: 64bit numbers truncated
Solution: cast python result to long long (lsq)
fixes: vim/vim#18899
closes: vim/vim#18904
a52b11d057
Co-authored-by: lsq <lsqypj@gmail.com>
This commit is contained in:
@@ -276,8 +276,13 @@ func Test_unicode()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test vim.eval() with various types.
|
" Test vim.eval() with various types.
|
||||||
func Test_python3_vim_val()
|
func Test_python3_vim_eval()
|
||||||
call assert_equal("\n8", execute('py3 print(vim.eval("3+5"))'))
|
call assert_equal("\n2061300532912", execute('py3 print(vim.eval("2061300532912"))'))
|
||||||
|
call assert_equal("\n9223372036854775807", execute('py3 print(vim.eval("9223372036854775807"))'))
|
||||||
|
call assert_equal("\n-9223372036854775807",execute('py3 print(vim.eval("-9223372036854775807"))'))
|
||||||
|
call assert_equal("\n2147483648", execute('py3 print(vim.eval("2147483648"))'))
|
||||||
|
call assert_equal("\n-2147483649", execute('py3 print(vim.eval("-2147483649"))'))
|
||||||
|
call assert_equal("\n8", execute('py3 print(vim.eval("3+5"))'))
|
||||||
if has('float')
|
if has('float')
|
||||||
call assert_equal("\n3.1399999999999997", execute('py3 print(vim.eval("1.01+2.13"))'))
|
call assert_equal("\n3.1399999999999997", execute('py3 print(vim.eval("1.01+2.13"))'))
|
||||||
call assert_equal("\n0.0", execute('py3 print(vim.eval("0.0/(1.0/0.0)"))'))
|
call assert_equal("\n0.0", execute('py3 print(vim.eval("0.0/(1.0/0.0)"))'))
|
||||||
|
|||||||
Reference in New Issue
Block a user