blob: 749d8ad04c27aa34208ccd8a52ce1f6f2f85a5e2 [file] [log] [blame]
Bram Moolenaar9d47f172006-03-15 23:03:01 +00001Tests for undo tree.
2Since this script is sourced we need to explicitly break changes up in
3undo-able pieces. Do that by setting 'undolevels'.
4
5STARTTEST
6:" Delete three characters and undo
7Gx:set ul=100
8x:set ul=100
9x:.w! test.out
10g-:.w >>test.out
11g-:.w >>test.out
12g-:.w >>test.out
13g-:.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
18x:set ul=100
19x:.w >>test.out
20:sleep 1
21g-:.w >>test.out
22g-:.w >>test.out
23g-:.w >>test.out
24g-:.w >>test.out
25g-:.w >>test.out
26g-:.w >>test.out
27g-:.w >>test.out
28g-:.w >>test.out
2910g+:.w >>test.out
30:"
31:/^222/w >>test.out
32:" Delay for three seconds and go some seconds forward and backward
Bram Moolenaarfa1d1402006-03-25 21:59:56 +000033:sleep 2
Bram Moolenaar9d47f172006-03-15 23:03:01 +000034Aa:set ul=100
35Ab:set ul=100
36Ac: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!
47ENDTEST
48
491111 -----
502222 -----
51
52123456789