annotate src/testdir/test61.in @ 5649:beb037a6c270 v7.4.171

updated for version 7.4.171 Problem: Redo does not set v:count and v:count1. Solution: Use a separate buffer for redo, so that we can set the counts when performing redo.
author Bram Moolenaar <bram@vim.org>
date Tue, 11 Feb 2014 15:10:43 +0100
parents 6e611380b4cf
children bc269cf15ccd
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
2579
1c00ea3641a8 updated for version 7.3.005
Bram Moolenaar <bram@vim.org>
parents: 2281
diff changeset
7 :echo undotree().entries
1c00ea3641a8 updated for version 7.3.005
Bram Moolenaar <bram@vim.org>
parents: 2281
diff changeset
8 ENDTEST
1c00ea3641a8 updated for version 7.3.005
Bram Moolenaar <bram@vim.org>
parents: 2281
diff changeset
9
1c00ea3641a8 updated for version 7.3.005
Bram Moolenaar <bram@vim.org>
parents: 2281
diff changeset
10 STARTTEST
767
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
11 :" Delete three characters and undo
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
12 Gx:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
13 x:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
14 x:.w! test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
15 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
16 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
17 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
18 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
19 :"
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
20 :/^111/w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
21 :" Delete three other characters and go back in time step by step
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
22 $x:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
23 x:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
24 x:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
25 :sleep 1
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 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
31 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
32 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
33 g-:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
34 10g+:.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
35 :"
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
36 :/^222/w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
37 :" Delay for three seconds and go some seconds forward and backward
805
497fab3f99d6 updated for version 7.0b01
vimboss
parents: 800
diff changeset
38 :sleep 2
767
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
39 Aa:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
40 Ab:set ul=100
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
41 Ac:set ul=100
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 :ear 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 :ear 3s
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
46 :.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
47 :later 1s
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
48 :.w >>test.out
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
49 :later 1h
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
50 :.w >>test.out
840
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
51 :"
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
52 :" test undojoin
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
53 Goaaaa:set ul=100
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
54 obbbbu:.w >>test.out
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
55 obbbb:set ul=100
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
56 :undojoin
2c885fab04e3 updated for version 7.0e06
vimboss
parents: 805
diff changeset
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
4909
2945fe016b93 updated for version 7.3.1200
Bram Moolenaar <bram@vim.org>
parents: 2579
diff changeset
87 :so small.vim
5014
788f48029677 updated for version 7.3.1251
Bram Moolenaar <bram@vim.org>
parents: 4909
diff changeset
88 :set nocp viminfo+=nviminfo
4909
2945fe016b93 updated for version 7.3.1200
Bram Moolenaar <bram@vim.org>
parents: 2579
diff changeset
89 :enew!
2945fe016b93 updated for version 7.3.1200
Bram Moolenaar <bram@vim.org>
parents: 2579
diff changeset
90 oa
2945fe016b93 updated for version 7.3.1200
Bram Moolenaar <bram@vim.org>
parents: 2579
diff changeset
91 :set ul=100
2945fe016b93 updated for version 7.3.1200
Bram Moolenaar <bram@vim.org>
parents: 2579
diff changeset
92 ob
2945fe016b93 updated for version 7.3.1200
Bram Moolenaar <bram@vim.org>
parents: 2579
diff changeset
93 :set ul=100
2945fe016b93 updated for version 7.3.1200
Bram Moolenaar <bram@vim.org>
parents: 2579
diff changeset
94 o1a2=setline('.','1234')
2945fe016b93 updated for version 7.3.1200
Bram Moolenaar <bram@vim.org>
parents: 2579
diff changeset
95
5120
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
96 uu:"
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
97 oc
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
98 :set ul=100
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
99 o1a2=setline('.','1234')
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
100
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
101 u:"
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
102 od
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
103 :set ul=100
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
104 o1a2=string(123)
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
105 u:"
6e611380b4cf updated for version 7.3.1303
Bram Moolenaar <bram@vim.org>
parents: 5014
diff changeset
106 :%w >>test.out
767
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
107 :qa!
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
108 ENDTEST
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
109
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
110 1111 -----
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
111 2222 -----
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
112
6c8a16911e94 updated for version 7.0225
vimboss
parents:
diff changeset
113 123456789