call assert_equal('Xtabdir3', fnamemodify(getcwd(-1, 3), ':t'))
call assert_equal('Xtabdir3', fnamemodify(getcwd(1, 3), ':t'))
call assert_equal('Xwindir3', fnamemodify(getcwd(2, 3), ':t'))
- only | tabonly
- exe 'cd ' . save_cwd
+ %bwipe
+ call chdir(save_cwd)
call delete("Xtopdir", "rf")
endfunc
" Test for changing directory to the session file directory
func Test_mksession_sesdir()
+ let save_cwd = getcwd()
call mkdir('Xproj')
mksession! Xproj/Xtest_mks1.out
set sessionoptions-=curdir
call assert_equal('testdir', fnamemodify(getcwd(), ':t'))
source Xproj/Xtest_mks2.out
call assert_equal('Xproj', fnamemodify(getcwd(), ':t'))
- cd ..
+ call chdir(save_cwd)
+ %bwipe
set sessionoptions&
call delete('Xproj', 'rf')