diff src/testdir/test61.in @ 2281:e41433ea71df vim73

Added ":earlier 1f" and ":later 1f".
author Bram Moolenaar <bram@vim.org>
date Sun, 27 Jun 2010 05:18:54 +0200
parents 2e6906bbc5f4
children 1c00ea3641a8
line wrap: on
line diff
--- a/src/testdir/test61.in
+++ b/src/testdir/test61.in
@@ -1,6 +1,7 @@
 Tests for undo tree.
 Since this script is sourced we need to explicitly break changes up in
 undo-able pieces.  Do that by setting 'undolevels'.
+Also tests :earlier and :later.
 
 STARTTEST
 :" Delete three characters and undo
@@ -50,6 +51,35 @@ obbbbu:.w >>test.out
 obbbb:set ul=100
 :undojoin
 occccu:.w >>test.out
+:e! Xtest
+ione one one:set ul=100
+:w!
+otwo:set ul=100
+otwo:set ul=100
+:w
+othree:earlier 1f
+:" expect "one one one\ntwo\ntwo"
+:%yank a
+:earlier 1f
+:" expect "one one one"
+:%yank b
+:earlier 1f
+:" expect empty line
+:%yank c
+:later 1f
+:" expect "one one one"
+:%yank d
+:later 1f
+:" expect "one one one\ntwo\ntwo"
+:%yank e
+:later 1f
+:" expect "one one one\ntwo\ntwo\nthree"
+ggO---:0put e
+ggO---:0put d
+ggO---:0put c
+ggO---:0put b
+ggO---:0put a
+ggO---:w >>test.out
 :qa!
 ENDTEST