annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
767
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
1 Tests for undo tree.
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
2 Since this script is sourced we need to explicitly break changes up in
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
3 undo-able pieces. Do that by setting 'undolevels'.
2281
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
4 Also tests :earlier and :later.
767
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
5
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
6 STARTTEST
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
7 :" Delete three characters and undo
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
8 Gx:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
9 x:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
10 x:.w! test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
11 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
12 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
13 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
14 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
15 :"
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
16 :/^111/w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
17 :" Delete three other characters and go back in time step by step
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
18 $x:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
19 x:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
20 x:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
21 :sleep 1
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
22 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
23 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
24 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
25 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
26 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
27 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
28 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
29 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
30 10g+:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
31 :"
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
32 :/^222/w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
33 :" Delay for three seconds and go some seconds forward and backward
805
497fab3f99d6 updated for version 7.0b01
vimboss
parents: 800
diff changeset
34 :sleep 2
767
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
35 Aa:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
36 Ab:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
37 Ac:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
38 :.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
39 :ear 1s
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
40 :.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
41 :ear 3s
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
42 :.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
43 :later 1s
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
44 :.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
45 :later 1h
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
46 :.w >>test.out
840
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
47 :"
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
48 :" test undojoin
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
49 Goaaaa:set ul=100
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
50 obbbbu:.w >>test.out
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
51 obbbb:set ul=100
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
52 :undojoin
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
53 occccu:.w >>test.out
2281
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
54 :e! Xtest
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
55 ione one one:set ul=100
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
56 :w!
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
57 otwo:set ul=100
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
58 otwo:set ul=100
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
59 :w
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
60 othree:earlier 1f
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
61 :" expect "one one one\ntwo\ntwo"
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
62 :%yank a
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
63 :earlier 1f
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
64 :" expect "one one one"
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
65 :%yank b
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
66 :earlier 1f
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
67 :" expect empty line
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
68 :%yank c
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
69 :later 1f
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
70 :" expect "one one one"
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
71 :%yank d
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
72 :later 1f
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
73 :" expect "one one one\ntwo\ntwo"
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
74 :%yank e
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
75 :later 1f
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
76 :" expect "one one one\ntwo\ntwo\nthree"
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
77 ggO---:0put e
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
78 ggO---:0put d
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
79 ggO---:0put c
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
80 ggO---:0put b
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
81 ggO---:0put a
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2232
diff changeset
82 ggO---:w >>test.out
767
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
83 :qa!
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
84 ENDTEST
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
85
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
86 1111 -----
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
87 2222 -----
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
88
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
89 123456789