comparison src/testdir/test_terminal.vim @ 15406:63b02fcf1361 v8.1.0711

patch 8.1.0711: test files still use function! commit https://github.com/vim/vim/commit/1e1153600c0377472d62cc553173fe555ddcf5a7 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 9 23:01:02 2019 +0100 patch 8.1.0711: test files still use function! Problem: Test files still use function!. Solution: Remove the exclamation mark. Fix overwriting a function.
author Bram Moolenaar <Bram@vim.org>
date Wed, 09 Jan 2019 23:15:05 +0100
parents 74bc96b99f4f
children 47328ce4b7aa
comparison
equal deleted inserted replaced
15405:3a8785d45112 15406:63b02fcf1361
120 exe buf . 'bwipe' 120 exe buf . 'bwipe'
121 121
122 unlet g:job 122 unlet g:job
123 endfunc 123 endfunc
124 124
125 func! s:Nasty_exit_cb(job, st) 125 func s:Nasty_exit_cb(job, st)
126 exe g:buf . 'bwipe!' 126 exe g:buf . 'bwipe!'
127 let g:buf = 0 127 let g:buf = 0
128 endfunc 128 endfunc
129 129
130 func Get_cat_123_cmd() 130 func Get_cat_123_cmd()
1725 1725
1726 func Test_terminal_no_job() 1726 func Test_terminal_no_job()
1727 let term = term_start('false', {'term_finish': 'close'}) 1727 let term = term_start('false', {'term_finish': 'close'})
1728 call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) }) 1728 call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) })
1729 endfunc 1729 endfunc
1730
1731 func Test_term_gettitle()
1732 if !has('title') || empty(&t_ts)
1733 return
1734 endif
1735 " TODO: this fails on Travis
1736 return
1737
1738 " term_gettitle() returns an empty string for a non-terminal buffer
1739 " or for a non-existing buffer.
1740 call assert_equal('', term_gettitle(bufnr('%')))
1741 call assert_equal('', term_gettitle(bufnr('$') + 1))
1742
1743 let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'])
1744 call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) })
1745
1746 call term_sendkeys(term, ":e Xfoo\r")
1747 call WaitForAssert({-> assert_match('Xfoo (.*[/\\]testdir) - VIM', term_gettitle(term)) })
1748
1749 call term_sendkeys(term, ":set titlestring=foo\r")
1750 call WaitForAssert({-> assert_equal('foo', term_gettitle(term)) })
1751
1752 exe term . 'bwipe!'
1753 endfunc