diff options
Diffstat (limited to 'src/testdir/test_excmd.vim')
-rw-r--r-- | src/testdir/test_excmd.vim | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/testdir/test_excmd.vim b/src/testdir/test_excmd.vim index 472945d25..c59454864 100644 --- a/src/testdir/test_excmd.vim +++ b/src/testdir/test_excmd.vim @@ -349,6 +349,44 @@ func Test_run_excmd_with_text_locked() let cmd = ":\<C-\>eexecute('close')\<CR>\<C-C>" call assert_equal(2, winnr('$')) close + + call assert_fails("call feedkeys(\":\<C-R>=execute('bnext')\<CR>\", 'xt')", 'E523:') +endfunc + +" Test for the :verbose command +func Test_verbose_cmd() + call assert_equal([' verbose=1'], split(execute('verbose set vbs'), "\n")) + call assert_equal([' verbose=0'], split(execute('0verbose set vbs'), "\n")) + let l = execute("4verbose set verbose | set verbose") + call assert_equal([' verbose=4', ' verbose=0'], split(l, "\n")) +endfunc + +" Test for the :delete command and the related abbreviated commands +func Test_excmd_delete() + new + call setline(1, ['foo', "\tbar"]) + call assert_equal(['^Ibar$'], split(execute('dl'), "\n")) + call setline(1, ['foo', "\tbar"]) + call assert_equal(['^Ibar$'], split(execute('dell'), "\n")) + call setline(1, ['foo', "\tbar"]) + call assert_equal(['^Ibar$'], split(execute('delel'), "\n")) + call setline(1, ['foo', "\tbar"]) + call assert_equal(['^Ibar$'], split(execute('deletl'), "\n")) + call setline(1, ['foo', "\tbar"]) + call assert_equal(['^Ibar$'], split(execute('deletel'), "\n")) + call setline(1, ['foo', "\tbar"]) + call assert_equal([' bar'], split(execute('dp'), "\n")) + call setline(1, ['foo', "\tbar"]) + call assert_equal([' bar'], split(execute('dep'), "\n")) + call setline(1, ['foo', "\tbar"]) + call assert_equal([' bar'], split(execute('delp'), "\n")) + call setline(1, ['foo', "\tbar"]) + call assert_equal([' bar'], split(execute('delep'), "\n")) + call setline(1, ['foo', "\tbar"]) + call assert_equal([' bar'], split(execute('deletp'), "\n")) + call setline(1, ['foo', "\tbar"]) + call assert_equal([' bar'], split(execute('deletep'), "\n")) + close! endfunc " vim: shiftwidth=2 sts=2 expandtab |