view src/testdir/test_ex_undo.vim @ 24357:108a6e2497f6 v8.2.2719

patch 8.2.2719: Vim9: appending to dict item doesn't work in a :def function Commit: https://github.com/vim/vim/commit/e42939af87be3adad8c08ceb454e3a31114d7165 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 5 17:11:17 2021 +0200 patch 8.2.2719: Vim9: appending to dict item doesn't work in a :def function Problem: Vim9: appending to dict item doesn't work in a :def function. Solution: Implement assignment with operator on indexed item.
author Bram Moolenaar <Bram@vim.org>
date Mon, 05 Apr 2021 17:15:06 +0200
parents 08940efa6b4e
children
line wrap: on
line source

" Tests for :undo

func Test_ex_undo()
  new ex-undo
  setlocal ul=10
  exe "normal ione\n\<Esc>"
  setlocal ul=10
  exe "normal itwo\n\<Esc>"
  setlocal ul=10
  exe "normal ithree\n\<Esc>"
  call assert_equal(4, line('$'))
  undo
  call assert_equal(3, line('$'))
  undo 1
  call assert_equal(2, line('$'))
  undo 0
  call assert_equal(1, line('$'))
  quit!
endfunc

" vim: shiftwidth=2 sts=2 expandtab