view src/testdir/test_scroll_opt.vim @ 19029:8aa4ba1f9345 v8.2.0075

patch 8.2.0075: Python 3 unicode test still sometimes fails Commit: https://github.com/vim/vim/commit/2466aea508f22d44099d54ed6d15c0a1d90f8d6e Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 1 17:09:11 2020 +0100 patch 8.2.0075: Python 3 unicode test still sometimes fails Problem: Python 3 unicode test still sometimes fails. Solution: Skip the test when 'termencoding' is not empty.
author Bram Moolenaar <Bram@vim.org>
date Wed, 01 Jan 2020 17:15:03 +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