diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-09 23:01:02 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-09 23:01:02 +0100 |
commit | 1e1153600c0377472d62cc553173fe555ddcf5a7 (patch) | |
tree | 6b048ad52538ede86b31960d3c2f963411925c73 /src/testdir/test_terminal.vim | |
parent | c46af534102c65b43912311d67f55f5049e5ef7a (diff) | |
download | vim-git-1e1153600c0377472d62cc553173fe555ddcf5a7.tar.gz |
patch 8.1.0711: test files still use function!v8.1.0711
Problem: Test files still use function!.
Solution: Remove the exclamation mark. Fix overwriting a function.
Diffstat (limited to 'src/testdir/test_terminal.vim')
-rw-r--r-- | src/testdir/test_terminal.vim | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 71cf1b2c9..6cd26218e 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -122,7 +122,7 @@ func Test_terminal_hide_buffer() unlet g:job endfunc -func! s:Nasty_exit_cb(job, st) +func s:Nasty_exit_cb(job, st) exe g:buf . 'bwipe!' let g:buf = 0 endfunc @@ -1727,3 +1727,27 @@ func Test_terminal_no_job() let term = term_start('false', {'term_finish': 'close'}) call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) }) endfunc + +func Test_term_gettitle() + if !has('title') || empty(&t_ts) + return + endif + " TODO: this fails on Travis + return + + " term_gettitle() returns an empty string for a non-terminal buffer + " or for a non-existing buffer. + call assert_equal('', term_gettitle(bufnr('%'))) + call assert_equal('', term_gettitle(bufnr('$') + 1)) + + let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile']) + call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) }) + + call term_sendkeys(term, ":e Xfoo\r") + call WaitForAssert({-> assert_match('Xfoo (.*[/\\]testdir) - VIM', term_gettitle(term)) }) + + call term_sendkeys(term, ":set titlestring=foo\r") + call WaitForAssert({-> assert_equal('foo', term_gettitle(term)) }) + + exe term . 'bwipe!' +endfunc |