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'.
|
|
4
|
|
5 STARTTEST
|
|
6 :" Delete three characters and undo
|
|
7 Gx:set ul=100
|
|
8 x:set ul=100
|
|
9 x:.w! test.out
|
|
10 g-:.w >>test.out
|
|
11 g-:.w >>test.out
|
|
12 g-:.w >>test.out
|
|
13 g-:.w >>test.out
|
|
14 :"
|
|
15 :/^111/w >>test.out
|
|
16 :" Delete three other characters and go back in time step by step
|
|
17 $x:set ul=100
|
|
18 x:set ul=100
|
|
19 x:.w >>test.out
|
|
20 :sleep 1
|
|
21 g-:.w >>test.out
|
|
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 10g+:.w >>test.out
|
|
30 :"
|
|
31 :/^222/w >>test.out
|
|
32 :" Delay for three seconds and go some seconds forward and backward
|
805
|
33 :sleep 2
|
767
|
34 Aa:set ul=100
|
|
35 Ab:set ul=100
|
|
36 Ac:set ul=100
|
|
37 :.w >>test.out
|
|
38 :ear 1s
|
|
39 :.w >>test.out
|
|
40 :ear 3s
|
|
41 :.w >>test.out
|
|
42 :later 1s
|
|
43 :.w >>test.out
|
|
44 :later 1h
|
|
45 :.w >>test.out
|
|
46 :qa!
|
|
47 ENDTEST
|
|
48
|
|
49 1111 -----
|
|
50 2222 -----
|
|
51
|
|
52 123456789
|