aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-27 13:07:24 +0800
committerGitHub <noreply@github.com>2022-10-27 13:07:24 +0800
commit1fe31651bce5021ea6d6dfe6fa426fde7795a77f (patch)
treef62ed2f8b299b9886b1ec158477111525032c581 /src/nvim/testdir
parent7765f2bb8304631c00f1e00ffc73c18cd4d22601 (diff)
parente3acf913db7eb27d53ea8f91b70fb2c723796be9 (diff)
downloadrneovim-1fe31651bce5021ea6d6dfe6fa426fde7795a77f.tar.gz
rneovim-1fe31651bce5021ea6d6dfe6fa426fde7795a77f.tar.bz2
rneovim-1fe31651bce5021ea6d6dfe6fa426fde7795a77f.zip
Merge pull request #20826 from zeertzjq/vim-8.2.4206
vim-patch:8.2.{4070,4206,4207}
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_eval_stuff.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_eval_stuff.vim b/src/nvim/testdir/test_eval_stuff.vim
index dc110af356..851048ec5b 100644
--- a/src/nvim/testdir/test_eval_stuff.vim
+++ b/src/nvim/testdir/test_eval_stuff.vim
@@ -120,6 +120,13 @@ func Test_readfile_binary()
call delete('XReadfile_bin')
endfunc
+func Test_readfile_binary_empty()
+ call writefile([], 'Xempty-file')
+ " This used to compare uninitialized memory in Vim <= 8.2.4065
+ call assert_equal([''], readfile('Xempty-file', 'b'))
+ call delete('Xempty-file')
+endfunc
+
func Test_readfile_bom()
call writefile(["\ufeffFOO", "FOO\ufeffBAR"], 'XReadfile_bom')
call assert_equal(['FOO', 'FOOBAR'], readfile('XReadfile_bom'))
@@ -360,6 +367,11 @@ func Test_curly_assignment()
unlet g:gvar
endfunc
+func Test_deep_recursion()
+ " this was running out of stack
+ call assert_fails("exe 'if ' .. repeat('(', 1002)", 'E1169: Expression too recursive: ((')
+endfunc
+
" K_SPECIAL in the modified character used be escaped, which causes
" double-escaping with feedkeys() or as the return value of an <expr> mapping,
" and doesn't match what getchar() returns,