summaryrefslogtreecommitdiffstatshomepage
path: root/test/old/testdir/test_options.vim
diff options
context:
space:
mode:
Diffstat (limited to 'test/old/testdir/test_options.vim')
-rw-r--r--test/old/testdir/test_options.vim40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/old/testdir/test_options.vim b/test/old/testdir/test_options.vim
index b424383791..cbd1f74bd9 100644
--- a/test/old/testdir/test_options.vim
+++ b/test/old/testdir/test_options.vim
@@ -1470,6 +1470,46 @@ func Test_local_scrolloff()
set siso&
endfunc
+func Test_local_scrolloffpad()
+ let save_g_sop = &g:sop
+ let save_l_sop = &l:sop
+ set sop=0
+ call assert_equal(0, &g:sop)
+ call assert_equal(-1, &l:sop)
+ call assert_equal(0, &sop)
+ setglobal sop=1
+ call assert_equal(1, &g:sop)
+ call assert_equal(1, &sop)
+ split
+ call assert_equal(1, &g:sop)
+ call assert_equal(-1, &l:sop)
+ call assert_equal(1, &sop)
+ setlocal sop=0
+ call assert_equal(0, &l:sop)
+ call assert_equal(0, &sop)
+ call assert_equal(1, &g:sop)
+ wincmd p
+ call assert_equal(1, &sop)
+ wincmd p
+ "setlocal sop<
+ set sop<
+ call assert_equal(-1, &l:sop)
+ call assert_equal(1, &sop)
+ setlocal sop=2
+ call assert_equal(2, &l:sop)
+ call assert_equal(2, &sop)
+ setlocal sop=-1
+ call assert_equal(-1, &l:sop)
+ call assert_equal(1, &sop) " Uses global value because local is -1
+ call assert_fails("setlocal sop=-2", 'E474:')
+ call assert_equal(-1, &l:sop)
+ call assert_equal(1, &sop)
+ call assert_fails("setlocal sop=foo", 'E521:')
+ close
+ let &g:sop = save_g_sop
+ let &l:sop = save_l_sop
+endfunc
+
func Test_writedelay()
CheckFunction reltimefloat