File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,10 @@ def command(self, string):
116116 """Execute a single ex command."""
117117 return self ._session .request ('vim_command' , string )
118118
119+ def command_output (self , string ):
120+ """Execute a single ex command and return the output."""
121+ return self ._session .request ('vim_command_output' , string )
122+
119123 def eval (self , string ):
120124 """Evaluate a vimscript expression."""
121125 return self ._session .request ('vim_eval' , string )
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ def test_command():
1818 os .unlink (fname )
1919
2020
21+ @with_setup
22+ def test_command_output ():
23+ eq (vim .command_output ('echo test' ), 'test' )
24+
25+
2126@with_setup (setup = cleanup )
2227def test_eval ():
2328 vim .command ('let g:v1 = "a"' )
You can’t perform that action at this time.
0 commit comments