Mercurial > vim
comparison src/testdir/test_terminal.vim @ 12907:32531a3eab1f v8.0.1330
patch 8.0.1330: MS-Windows: job in terminal can't get back to Vim
commit https://github.com/vim/vim/commit/52dbb5ea7fde4a77178bc59e2383ca40df503812
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 21 18:11:27 2017 +0100
patch 8.0.1330: MS-Windows: job in terminal can't get back to Vim
Problem: MS-Windows: job in terminal can't get back to Vim.
Solution: set VIM_SERVERNAME in the environment. (Yasuhiro Matsumoto, closes
#2360)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 21 Nov 2017 18:15:06 +0100 |
parents | 411a30bd7e8a |
children | 7a9c4a8b1ceb |
comparison
equal
deleted
inserted
replaced
12906:c63e99d14a0f | 12907:32531a3eab1f |
---|---|
430 call WaitFor('"Xdir" == fnamemodify(getline(1), ":t")') | 430 call WaitFor('"Xdir" == fnamemodify(getline(1), ":t")') |
431 call assert_equal('Xdir', fnamemodify(getline(1), ":t")) | 431 call assert_equal('Xdir', fnamemodify(getline(1), ":t")) |
432 | 432 |
433 exe buf . 'bwipe' | 433 exe buf . 'bwipe' |
434 call delete('Xdir', 'rf') | 434 call delete('Xdir', 'rf') |
435 endfunc | |
436 | |
437 func Test_terminal_servername() | |
438 if !has('clientserver') | |
439 return | |
440 endif | |
441 let g:buf = Run_shell_in_terminal({}) | |
442 " Wait for the shell to display a prompt | |
443 call WaitFor('term_getline(g:buf, 1) != ""') | |
444 if has('win32') | |
445 call term_sendkeys(g:buf, "echo %VIM_SERVERNAME%\r") | |
446 else | |
447 call term_sendkeys(g:buf, "echo $VIM_SERVERNAME\r") | |
448 endif | |
449 call term_wait(g:buf) | |
450 call Stop_shell_in_terminal(g:buf) | |
451 call WaitFor('getline(2) == v:servername') | |
452 call assert_equal(v:servername, getline(2)) | |
453 | |
454 exe g:buf . 'bwipe' | |
455 unlet g:buf | |
435 endfunc | 456 endfunc |
436 | 457 |
437 func Test_terminal_env() | 458 func Test_terminal_env() |
438 let g:buf = Run_shell_in_terminal({'env': {'TESTENV': 'correct'}}) | 459 let g:buf = Run_shell_in_terminal({'env': {'TESTENV': 'correct'}}) |
439 " Wait for the shell to display a prompt | 460 " Wait for the shell to display a prompt |