If no pane is specified, test suite now tries to open a detached 'test' tmux session
This commit is contained in:
parent
9f9f8c6d93
commit
7e9c67b320
@ -3,7 +3,7 @@ let tmuxTestSessionName = "test"
|
|||||||
let defaultTmuxPaneId = g:tmuxTestSessionName . ":0.0"
|
let defaultTmuxPaneId = g:tmuxTestSessionName . ":0.0"
|
||||||
|
|
||||||
function InitializeTmuxTestSession()
|
function InitializeTmuxTestSession()
|
||||||
silent execute '!tmux new -ds ' . g:tmuxTestSessionName . ' -c $HOME >/dev/null 2>&1'
|
call system("tmux new -ds " . g:tmuxTestSessionName . " -c $HOME >/dev/null 2>&1")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ endfunction
|
|||||||
|
|
||||||
function TmuxTest(shellCommand, paneId = g:defaultTmuxPaneId)
|
function TmuxTest(shellCommand, paneId = g:defaultTmuxPaneId)
|
||||||
if a:paneId == g:defaultTmuxPaneId
|
if a:paneId == g:defaultTmuxPaneId
|
||||||
call InitializeTmuxTestSession()
|
silent call InitializeTmuxTestSession()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call system("tmux send-keys -t " . a:paneId . " '" . a:shellCommand . "' Enter")
|
call system("tmux send-keys -t " . a:paneId . " '" . a:shellCommand . "' Enter")
|
||||||
|
Loading…
Reference in New Issue
Block a user