test_ex_undo.vim 367 B

1234567891011121314151617181920
  1. " Tests for :undo
  2. func Test_ex_undo()
  3. new ex-undo
  4. setlocal ul=10
  5. exe "normal ione\n\<Esc>"
  6. setlocal ul=10
  7. exe "normal itwo\n\<Esc>"
  8. setlocal ul=10
  9. exe "normal ithree\n\<Esc>"
  10. call assert_equal(4, line('$'))
  11. undo
  12. call assert_equal(3, line('$'))
  13. undo 1
  14. call assert_equal(2, line('$'))
  15. undo 0
  16. call assert_equal(1, line('$'))
  17. quit!
  18. endfunc