@@ -25,6 +25,26 @@ func Test_complete_wildmenu()
2525 set nowildmenu
2626endfunc
2727
28+ func Test_map_completion ()
29+ if ! has (' cmdline_compl' )
30+ return
31+ endif
32+ call feedkeys (" :map <unique> <si\<Tab>\<Home> \" \<CR> " , ' xt' )
33+ call assert_equal (' "map <unique> <silent>' , getreg (' :' ))
34+ call feedkeys (" :map <script> <un\<Tab>\<Home> \" \<CR> " , ' xt' )
35+ call assert_equal (' "map <script> <unique>' , getreg (' :' ))
36+ call feedkeys (" :map <expr> <sc\<Tab>\<Home> \" \<CR> " , ' xt' )
37+ call assert_equal (' "map <expr> <script>' , getreg (' :' ))
38+ call feedkeys (" :map <buffer> <e\<Tab>\<Home> \" \<CR> " , ' xt' )
39+ call assert_equal (' "map <buffer> <expr>' , getreg (' :' ))
40+ call feedkeys (" :map <nowait> <b\<Tab>\<Home> \" \<CR> " , ' xt' )
41+ call assert_equal (' "map <nowait> <buffer>' , getreg (' :' ))
42+ call feedkeys (" :map <special> <no\<Tab>\<Home> \" \<CR> " , ' xt' )
43+ call assert_equal (' "map <special> <nowait>' , getreg (' :' ))
44+ call feedkeys (" :map <silent> <sp\<Tab>\<Home> \" \<CR> " , ' xt' )
45+ call assert_equal (' "map <silent> <special>' , getreg (' :' ))
46+ endfunc
47+
2848func Test_match_completion ()
2949 if ! has (' cmdline_compl' )
3050 return
0 commit comments