Mercurial > vim
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 |
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 | |
7 :" Delete three characters and undo | |
8 Gx:set ul=100 | |
9 x:set ul=100 | |
10 x:.w! test.out | |
11 g-:.w >>test.out | |
12 g-:.w >>test.out | |
13 g-:.w >>test.out | |
14 g-:.w >>test.out | |
15 :" | |
16 :/^111/w >>test.out | |
17 :" Delete three other characters and go back in time step by step | |
18 $x:set ul=100 | |
19 x:set ul=100 | |
20 x:.w >>test.out | |
21 :sleep 1 | |
22 g-:.w >>test.out | |
23 g-:.w >>test.out | |
24 g-:.w >>test.out | |
25 g-:.w >>test.out | |
26 g-:.w >>test.out | |
27 g-:.w >>test.out | |
28 g-:.w >>test.out | |
29 g-:.w >>test.out | |
30 10g+:.w >>test.out | |
31 :" | |
32 :/^222/w >>test.out | |
33 :" Delay for three seconds and go some seconds forward and backward | |
805 | 34 :sleep 2 |
767 | 35 Aa:set ul=100 |
36 Ab:set ul=100 | |
37 Ac:set ul=100 | |
38 :.w >>test.out | |
39 :ear 1s | |
40 :.w >>test.out | |
41 :ear 3s | |
42 :.w >>test.out | |
43 :later 1s | |
44 :.w >>test.out | |
45 :later 1h | |
46 :.w >>test.out | |
840 | 47 :" |
48 :" test undojoin | |
49 Goaaaa:set ul=100 | |
50 obbbbu:.w >>test.out | |
51 obbbb:set ul=100 | |
52 :undojoin | |
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 | 83 :qa! |
84 ENDTEST | |
85 | |
86 1111 ----- | |
87 2222 ----- | |
88 | |
89 123456789 |