diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-03-25 20:31:32 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-03-25 20:31:32 +0200 |
commit | cf67a509e93167f14c892301e13de14636cedc61 (patch) | |
tree | 3c0b05d4e719a83e6321d6e5eb14aa057ef547dc /src/testdir/screendump.vim | |
parent | 2de50f87622cd4e631fd17845e16a94ed5992b80 (diff) |
patch 8.0.1644: terminal API tests still failv8.0.1644
Problem: Terminal API tests still fail.
Solution: Explicitly set 'title' in the terminal job. (Ozaki Kiichi,
closes #2750)
Diffstat (limited to 'src/testdir/screendump.vim')
-rw-r--r-- | src/testdir/screendump.vim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim index 60c0ccb012..87a5823cc2 100644 --- a/src/testdir/screendump.vim +++ b/src/testdir/screendump.vim @@ -24,7 +24,9 @@ source shared.vim " By default uses a size of 20 lines and 75 columns. " Returns the buffer number of the terminal. " -" Options is a dictionary (not used yet). +" Options is a dictionary, these items are recognized: +" "rows" - height of the terminal window (max. 20) +" "cols" - width of the terminal window (max. 78) func RunVimInTerminal(arguments, options) " If Vim doesn't exit a swap file remains, causing other tests to fail. " Remove it here. @@ -47,17 +49,15 @@ func RunVimInTerminal(arguments, options) set t_Co=256 background=light hi Normal ctermfg=NONE ctermbg=NONE - " Make the window 20 lines high, unless told otherwise. - let rows = 20 - if has_key(a:options, 'rows') - let rows = a:options['rows'] - endif + " Make the window 20 lines high and 75 columns, unless told otherwise. + let rows = get(a:options, 'rows', 20) + let cols = get(a:options, 'cols', 75) let cmd = GetVimCommandClean() " Add -v to have gvim run in the terminal (if possible) let cmd .= ' -v ' . a:arguments - let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': 75}) - call assert_equal([rows, 75], term_getsize(buf)) + let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': cols}) + call assert_equal([rows, cols], term_getsize(buf)) return buf endfunc |