1" Test the :behave command 2 3func Test_behave() 4 behave mswin 5 call assert_equal('mouse,key', &selectmode) 6 call assert_equal('popup', &mousemodel) 7 call assert_equal('startsel,stopsel', &keymodel) 8 call assert_equal('exclusive', &selection) 9 10 behave xterm 11 call assert_equal('', &selectmode) 12 call assert_equal('extend', &mousemodel) 13 call assert_equal('', &keymodel) 14 call assert_equal('inclusive', &selection) 15 16 set selection& 17 set mousemodel& 18 set keymodel& 19 set selection& 20endfunc 21 22func Test_behave_completion() 23 call feedkeys(":behave \<C-A>\<C-B>\"\<CR>", 'tx') 24 call assert_equal('"behave mswin xterm', @:) 25endfunc 26 27func Test_behave_error() 28 call assert_fails('behave x', 'E475:') 29endfunc 30 31" vim: shiftwidth=2 sts=2 expandtab 32