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)
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index ece8120..16ad720 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -567,10 +567,12 @@
call assert_fails("call term_start(cmd, {'term_opencmd': 'split %d and %s'})", 'E475:')
call assert_fails("call term_start(cmd, {'term_opencmd': 'split % and %d'})", 'E475:')
- call term_start(cmd, {'term_finish': 'open', 'term_opencmd': '4split | buffer %d'})
+ call term_start(cmd, {'term_finish': 'open', 'term_opencmd': '4split | buffer %d | let g:result = "opened the buffer in a window"'})
close!
call WaitForAssert({-> assert_equal(2, winnr('$'))}, waittime)
call assert_equal(4, winheight(0))
+ call assert_equal('opened the buffer in a window', g:result)
+ unlet g:result
bwipe
endfunc