Mercurial > vim
comparison src/testdir/test_terminal.vim @ 22864:b825d8ec9a76 v8.2.1979
patch 8.2.1979: "term_opencmd" option of term_start() is truncated
Commit: https://github.com/vim/vim/commit/47c5ea44b975adca00eaacecee5c4108996178d9
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 12 15:12:15 2020 +0100
patch 8.2.1979: "term_opencmd" option of term_start() is truncated
Problem: "term_opencmd" option of term_start() is truncated. (Sergey
Vlasov)
Solution: Allocate the buffer to hold the command. (closes #7284)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 12 Nov 2020 15:15:04 +0100 |
parents | 0b4658e030cb |
children | 5a7db84713dc |
comparison
equal
deleted
inserted
replaced
22863:77566fd830f5 | 22864:b825d8ec9a76 |
---|---|
565 call assert_fails("call term_start(cmd, {'term_opencmd': 'open'})", 'E475:') | 565 call assert_fails("call term_start(cmd, {'term_opencmd': 'open'})", 'E475:') |
566 call assert_fails("call term_start(cmd, {'term_opencmd': 'split %x'})", 'E475:') | 566 call assert_fails("call term_start(cmd, {'term_opencmd': 'split %x'})", 'E475:') |
567 call assert_fails("call term_start(cmd, {'term_opencmd': 'split %d and %s'})", 'E475:') | 567 call assert_fails("call term_start(cmd, {'term_opencmd': 'split %d and %s'})", 'E475:') |
568 call assert_fails("call term_start(cmd, {'term_opencmd': 'split % and %d'})", 'E475:') | 568 call assert_fails("call term_start(cmd, {'term_opencmd': 'split % and %d'})", 'E475:') |
569 | 569 |
570 call term_start(cmd, {'term_finish': 'open', 'term_opencmd': '4split | buffer %d'}) | 570 call term_start(cmd, {'term_finish': 'open', 'term_opencmd': '4split | buffer %d | let g:result = "opened the buffer in a window"'}) |
571 close! | 571 close! |
572 call WaitForAssert({-> assert_equal(2, winnr('$'))}, waittime) | 572 call WaitForAssert({-> assert_equal(2, winnr('$'))}, waittime) |
573 call assert_equal(4, winheight(0)) | 573 call assert_equal(4, winheight(0)) |
574 call assert_equal('opened the buffer in a window', g:result) | |
575 unlet g:result | |
574 bwipe | 576 bwipe |
575 endfunc | 577 endfunc |
576 | 578 |
577 func Test_terminal_cwd() | 579 func Test_terminal_cwd() |
578 if has('win32') | 580 if has('win32') |