diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-15 14:11:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-15 14:11:10 +0800 |
commit | 1ca77c222b00215657bae416eba5d280a1d9dc29 (patch) | |
tree | 2d203ebcd6609c1db6c61cde4d43fccb7424f341 /test/old/testdir/test_functions.vim | |
parent | c2e47e7bec0394a2cc12c8f83e3e5950ad99d1b4 (diff) | |
parent | 85741677c86f7686e3597a310f8059608e7816fb (diff) | |
download | rneovim-1ca77c222b00215657bae416eba5d280a1d9dc29.tar.gz rneovim-1ca77c222b00215657bae416eba5d280a1d9dc29.tar.bz2 rneovim-1ca77c222b00215657bae416eba5d280a1d9dc29.zip |
Merge pull request #23097 from zeertzjq/vim-8.2.0101
vim-patch:8.2.{0101,0102,0103,0104,0633,0634}: null typval tests
Diffstat (limited to 'test/old/testdir/test_functions.vim')
-rw-r--r-- | test/old/testdir/test_functions.vim | 26 |
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 |