Mercurial > vim
annotate src/testdir/test61.in @ 4572:ef476bdc9274
Added tag v7-3-1033 for changeset b2a8e3a66f8c
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 28 May 2013 22:03:20 +0200 |
parents | 1c00ea3641a8 |
children | 2945fe016b93 |
rev | line source |
---|---|
767 | 1 Tests for undo tree. |
2 Since this script is sourced we need to explicitly break changes up in | |
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 | 5 |
6 STARTTEST | |
2579 | 7 :echo undotree().entries |
8 ENDTEST | |
9 | |
10 STARTTEST | |
767 | 11 :" Delete three characters and undo |
12 Gx:set ul=100 | |
13 x:set ul=100 | |
14 x:.w! test.out | |
15 g-:.w >>test.out | |
16 g-:.w >>test.out | |
17 g-:.w >>test.out | |
18 g-:.w >>test.out | |
19 :" | |
20 :/^111/w >>test.out | |
21 :" Delete three other characters and go back in time step by step | |
22 $x:set ul=100 | |
23 x:set ul=100 | |
24 x:.w >>test.out | |
25 :sleep 1 | |
26 g-:.w >>test.out | |
27 g-:.w >>test.out | |
28 g-:.w >>test.out | |
29 g-:.w >>test.out | |
30 g-:.w >>test.out | |
31 g-:.w >>test.out | |
32 g-:.w >>test.out | |
33 g-:.w >>test.out | |
34 10g+:.w >>test.out | |
35 :" | |
36 :/^222/w >>test.out | |
37 :" Delay for three seconds and go some seconds forward and backward | |
805 | 38 :sleep 2 |
767 | 39 Aa:set ul=100 |
40 Ab:set ul=100 | |
41 Ac:set ul=100 | |
42 :.w >>test.out | |
43 :ear 1s | |
44 :.w >>test.out | |
45 :ear 3s | |
46 :.w >>test.out | |
47 :later 1s | |
48 :.w >>test.out | |
49 :later 1h | |
50 :.w >>test.out | |
840 | 51 :" |
52 :" test undojoin | |
53 Goaaaa:set ul=100 | |
54 obbbbu:.w >>test.out | |
55 obbbb:set ul=100 | |
56 :undojoin | |
57 occccu:.w >>test.out | |
2281
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
58 :e! Xtest |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
59 ione one one:set ul=100 |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
60 :w! |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
61 otwo:set ul=100 |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
62 otwo:set ul=100 |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
63 :w |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
64 othree:earlier 1f |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
65 :" expect "one one one\ntwo\ntwo" |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
66 :%yank a |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
67 :earlier 1f |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
68 :" expect "one one one" |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
69 :%yank b |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
70 :earlier 1f |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
71 :" expect empty line |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
72 :%yank c |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
73 :later 1f |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
74 :" expect "one one one" |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
75 :%yank d |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
76 :later 1f |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
77 :" expect "one one one\ntwo\ntwo" |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
78 :%yank e |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
79 :later 1f |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
80 :" expect "one one one\ntwo\ntwo\nthree" |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
81 ggO---:0put e |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
82 ggO---:0put d |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
83 ggO---:0put c |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
84 ggO---:0put b |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
85 ggO---:0put a |
e41433ea71df
Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
86 ggO---:w >>test.out |
767 | 87 :qa! |
88 ENDTEST | |
89 | |
90 1111 ----- | |
91 2222 ----- | |
92 | |
93 123456789 |