aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_functions.vim
diff options
context:
space:
mode:
Diffstat (limited to 'test/old/testdir/test_functions.vim')
-rw-r--r--test/old/testdir/test_functions.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index 4ed1187a19..94c7e20264 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -990,6 +990,7 @@ func Test_matchstrpos()
call assert_equal(['', -1, -1], matchstrpos('testing', 'ing', 8))
call assert_equal(['ing', 1, 4, 7], matchstrpos(['vim', 'testing', 'execute'], 'ing'))
call assert_equal(['', -1, -1, -1], matchstrpos(['vim', 'testing', 'execute'], 'img'))
+ call assert_equal(['', -1, -1], matchstrpos(v:_null_list, '\a'))
endfunc
func Test_nextnonblank_prevnonblank()
@@ -1284,6 +1285,7 @@ func Test_hlexists()
syntax off
endfunc
+" Test for the col() function
func Test_col()
new
call setline(1, 'abcdef')
@@ -1435,6 +1437,8 @@ func Test_inputlist()
call assert_equal(-2, c)
call assert_fails('call inputlist("")', 'E686:')
+ " Nvim accepts null list as empty list
+ " call assert_fails('call inputlist(v:_null_list)', 'E686:')
endfunc
func Test_range_inputlist()
@@ -2357,6 +2361,16 @@ func Test_garbagecollect_now_fails()
let v:testing = 1
endfunc
+" Test for echo highlighting
+func Test_echohl()
+ echohl Search
+ echo 'Vim'
+ call assert_equal('Vim', Screenline(&lines))
+ " TODO: How to check the highlight group used by echohl?
+ " ScreenAttrs() returns all zeros.
+ echohl None
+endfunc
+
" Test for the eval() function
func Test_eval()
call assert_fails("call eval('5 a')", 'E488:')
@@ -2515,6 +2529,18 @@ func Test_glob()
call assert_fails("call glob('*', 0, {})", 'E728:')
endfunc
+" Test for browse()
+func Test_browse()
+ CheckFeature browse
+ call assert_fails('call browse([], "open", "x", "a.c")', 'E745:')
+endfunc
+
+" Test for browsedir()
+func Test_browsedir()
+ CheckFeature browse
+ call assert_fails('call browsedir("open", [])', 'E730:')
+endfunc
+
func HasDefault(msg = 'msg')
return a:msg
endfunc