New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests for the :behave command #3429

wants to merge 1 commit into
base: master
Jump to file or symbol
Failed to load files and symbols.
+31 −0
Diff settings


Just for now

Added tests for the :behave command

  • Loading branch information...
dpelle committed Sep 13, 2018
commit 71c2bff20f633e2f737e508cd0d5070b07db1776
@@ -14,6 +14,7 @@ NEW_TESTS = \
test_autoload \
test_backspace_opt \
test_backup \
test_behave \
test_blockedit \
test_breakindent \
test_bufline \
@@ -3,6 +3,7 @@
source test_assign.vim
source test_backup.vim
source test_behave.vim
source test_bufline.vim
source test_cd.vim
source test_changedtick.vim
@@ -0,0 +1,29 @@
" Test the :behave command
func Test_behave()
behave mswin
call assert_equal('mouse,key', &selectmode)
call assert_equal('popup', &mousemodel)
call assert_equal('startsel,stopsel', &keymodel)
call assert_equal('exclusive', &selection)
behave xterm
call assert_equal('', &selectmode)
call assert_equal('extend', &mousemodel)
call assert_equal('', &keymodel)
call assert_equal('inclusive', &selection)
set selection&
set mousemodel&
set keymodel&
set selection&
func Test_behave_completion()
call feedkeys(":behave \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal('"behave mswin xterm', @:)
func Test_behave_error()
call assert_fails('behave x', 'E475:')
ProTip! Use n and p to navigate between commits in a pull request.