view src/testdir/test_scroll_opt.vim @ 18625:57927799c27e v8.1.2305

patch 8.1.2305: no warning for wrong entry in translations Commit: https://github.com/vim/vim/commit/e53ec39270c805a95e405812e4c463c87a150eda Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 16 18:49:50 2019 +0100 patch 8.1.2305: no warning for wrong entry in translations Problem: No warning for wrong entry in translations. Solution: Check semicolons in keywords entry of desktop file.
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Nov 2019 19:00:04 +0100
parents f8f505ffc0a6
children 08940efa6b4e
line wrap: on
line source

" Test for reset 'scroll'
"

func Test_reset_scroll()
  let scr = &l:scroll

  setlocal scroll=1
  setlocal scroll&
  call assert_equal(scr, &l:scroll)

  setlocal scroll=1
  setlocal scroll=0
  call assert_equal(scr, &l:scroll)

  try
    execute 'setlocal scroll=' . (winheight(0) + 1)
    " not reached
    call assert_false(1)
  catch
    call assert_exception('E49:')
  endtry

  split

  let scr = &l:scroll

  setlocal scroll=1
  setlocal scroll&
  call assert_equal(scr, &l:scroll)

  setlocal scroll=1
  setlocal scroll=0
  call assert_equal(scr, &l:scroll)

  quit!
endfunc