xref: /vim-8.2.3635/src/testdir/test_cd.vim (revision e0720cbf)
1" Test for :cd
2
3func Test_cd_large_path()
4  " This used to crash with a heap write overflow.
5  call assert_fails('cd ' . repeat('x', 5000), 'E472:')
6endfunc
7
8func Test_cd_up_and_down()
9  let path = getcwd()
10  cd ..
11  exe 'cd ' . path
12  call assert_equal(path, getcwd())
13endfunc
14