forked from aniani/vim
Problem: Crash with cd command with very long argument. Solution: Check for running out of space. (Dominique pending, closes #1576)
14 lines
278 B
VimL
14 lines
278 B
VimL
" Test for :cd
|
|
|
|
func Test_cd_large_path()
|
|
" This used to crash with a heap write overflow.
|
|
call assert_fails('cd ' . repeat('x', 5000), 'E472:')
|
|
endfunc
|
|
|
|
func Test_cd_up_and_down()
|
|
let path = getcwd()
|
|
cd ..
|
|
exe 'cd ' . path
|
|
call assert_equal(path, getcwd())
|
|
endfunc
|