From 08d7744e13bca2ea069e927ecdfc78ecfa4214fc Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 5 Jan 2026 00:38:57 -0500 Subject: [PATCH] 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 https://github.com/vim/vim/commit/a52b11d05757ee9c056a7f1118e6f7d3c2da9d44 Co-authored-by: lsq --- test/old/testdir/test_python3.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/old/testdir/test_python3.vim b/test/old/testdir/test_python3.vim index 558c9f2770..ae2a531bde 100644 --- a/test/old/testdir/test_python3.vim +++ b/test/old/testdir/test_python3.vim @@ -276,8 +276,13 @@ func Test_unicode() endfunc " Test vim.eval() with various types. -func Test_python3_vim_val() - call assert_equal("\n8", execute('py3 print(vim.eval("3+5"))')) +func Test_python3_vim_eval() + 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') 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)"))'))