Skip to content

Commit f012d10

Browse files
committed
add test
1 parent f2274d5 commit f012d10

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/testdir/test_terminal.vim

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2497,14 +2497,14 @@ func Test_terminal_in_popup()
24972497

24982498
call term_sendkeys(buf, ":q\<CR>")
24992499
call VerifyScreenDump(buf, 'Test_terminal_popup_2', {})
2500-
2500+
25012501
call term_sendkeys(buf, ":call OpenTerm(1)\<CR>")
25022502
call TermWait(buf, 150)
25032503
call term_sendkeys(buf, ":set hlsearch\<CR>")
25042504
call TermWait(buf, 100)
25052505
call term_sendkeys(buf, "/edit\<CR>")
25062506
call VerifyScreenDump(buf, 'Test_terminal_popup_3', {})
2507-
2507+
25082508
call term_sendkeys(buf, "\<C-W>:call HidePopup()\<CR>")
25092509
call VerifyScreenDump(buf, 'Test_terminal_popup_4', {})
25102510
call term_sendkeys(buf, "\<CR>")
@@ -2857,6 +2857,16 @@ func Test_term_mouse()
28572857
call delete('Xbuf')
28582858
endfunc
28592859

2860+
" Test for sync buffer cwd with shell's pwd
2861+
func Test_terminal_syn_pwd()
2862+
CheckUnix
2863+
let tmpfolder = fnamemodify(tempname(),':h')
2864+
let buf = Run_shell_in_terminal({})
2865+
call term_sendkeys(buf, "echo -ne $'\\e\]7;file://".tmpfolder."\\a'\<CR>")
2866+
call TermWait(buf)
2867+
call assert_equal(tmpfolder, getcwd(winnr()))
2868+
endfunc
2869+
28602870
" Test for modeless selection in a terminal
28612871
func Test_term_modeless_selection()
28622872
CheckUnix

0 commit comments

Comments
 (0)