blob: 72411b4870f36482f3fd779148482730a4ea24c1 [file] [log] [blame]
Bram Moolenaarda1f71d2018-09-14 20:10:32 +02001" 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
Bram Moolenaar6d91bcb2020-08-12 18:50:36 +020030
31" vim: shiftwidth=2 sts=2 expandtab