diff options
Diffstat (limited to 'src/testdir/test_functions.vim')
-rw-r--r-- | src/testdir/test_functions.vim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index ef4180a770..696043c7b4 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -800,6 +800,10 @@ func Test_getbufvar() call assert_equal(0, getbufvar(bnr, '&autoindent')) call assert_equal(0, getbufvar(bnr, '&autoindent', 1)) + " Set and get a buffer-local variable + call setbufvar(bnr, 'bufvar_test', ['one', 'two']) + call assert_equal(['one', 'two'], getbufvar(bnr, 'bufvar_test')) + " Open new window with forced option values set fileformats=unix,dos new ++ff=dos ++bin ++enc=iso-8859-2 @@ -1498,6 +1502,10 @@ func Test_func_sandbox() call assert_fails('call Fsandbox()', 'E48:') delfunc Fsandbox + + " From a sandbox try to set a predefined variable (which cannot be modified + " from a sandbox) + call assert_fails('sandbox let v:lnum = 10', 'E794:') endfunc func EditAnotherFile() @@ -2030,14 +2038,6 @@ func Test_range() " sort() call assert_equal([0, 1, 2, 3, 4, 5], sort(range(5, 0, -1))) - " 'spellsuggest' - func MySuggest() - return range(3) - endfunc - set spell spellsuggest=expr:MySuggest() - call assert_equal([], spellsuggest('baord', 3)) - set nospell spellsuggest& - " string() call assert_equal('[0, 1, 2, 3, 4]', string(range(5))) |