Mercurial > vim
annotate src/testdir/test72.in @ 6136:1134bba900c1 v7.4.406
updated for version 7.4.406
Problem: Test 72 and 100 fail on MS-Windows.
Solution: Set fileformat to unix in the tests. (Taro Muraoka)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 16 Aug 2014 17:34:34 +0200 |
parents | 18ac55444b37 |
children | fd4dc6581b0e |
rev | line source |
---|---|
2232
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
1 Tests for undo file. |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
2 Since this script is sourced we need to explicitly break changes up in |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
3 undo-able pieces. Do that by setting 'undolevels'. |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
4 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
5 STARTTEST |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
6 :so small.vim |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
7 :" |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
8 :" Test 'undofile': first a simple one-line change. |
2504
dcb3ab4587b4
Set 'visualbell' in test 72 to avoid a beep.
Bram Moolenaar <bram@vim.org>
parents:
2459
diff
changeset
|
9 :set nocompatible viminfo+=nviminfo visualbell |
2456
2876ac15b8c8
Avoid that running tests changes viminfo.
Bram Moolenaar <bram@vim.org>
parents:
2438
diff
changeset
|
10 :set ul=100 undofile nomore |
6136 | 11 :set ff=unix |
2232
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
12 :e! Xtestfile |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
13 ggdGithis is one line:set ul=100 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
14 :s/one/ONE/ |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
15 :set ul=100 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
16 :w |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
17 :bwipe! |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
18 :e Xtestfile |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
19 u:.w! test.out |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
20 :" |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
21 :" Test 'undofile', change in original file fails check |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
22 :set noundofile |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
23 :e! Xtestfile |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
24 :s/line/Line/ |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
25 :w |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
26 :set undofile |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
27 :bwipe! |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
28 :e Xtestfile |
2459
64df5d008ccb
Fix: test 69 didn't work on MS-Windows. Test 72 beeped too often.
Bram Moolenaar <bram@vim.org>
parents:
2456
diff
changeset
|
29 :" TODO: this beeps |
2232
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
30 u:.w >>test.out |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
31 :" |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
32 :" Test 'undofile', add 10 lines, delete 6 lines, undo 3 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
33 :set undofile |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
34 ggdGione |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
35 two |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
36 three |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
37 four |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
38 five |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
39 six |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
40 seven |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
41 eight |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
42 nine |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
43 ten:set ul=100 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
44 3Gdd:set ul=100 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
45 dd:set ul=100 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
46 dd:set ul=100 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
47 dd:set ul=100 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
48 dd:set ul=100 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
49 dd:set ul=100 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
50 :w |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
51 :bwipe! |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
52 :e Xtestfile |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
53 uuu:w >>test.out |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
54 :" |
3246 | 55 :" Test that reading the undofiles when setting undofile works |
56 :set noundofile ul=0 | |
57 i | |
58 u:e! Xtestfile | |
59 :set undofile ul=100 | |
60 uuuuuu:w >>test.out | |
2438
9614fe67034c
Fix test 72 not setting encryption method. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2267
diff
changeset
|
61 :" And now with encryption, cryptmethod=zip |
2239
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
62 :e! Xtestfile |
2438
9614fe67034c
Fix test 72 not setting encryption method. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2267
diff
changeset
|
63 :set undofile cm=zip |
2459
64df5d008ccb
Fix: test 69 didn't work on MS-Windows. Test 72 beeped too often.
Bram Moolenaar <bram@vim.org>
parents:
2456
diff
changeset
|
64 ggdGimonday |
2239
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
65 tuesday |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
66 wednesday |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
67 thursday |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
68 friday:set ul=100 |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
69 kkkdd:set ul=100 |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
70 dd:set ul=100 |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
71 dd:set ul=100 |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
72 :X |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
73 foobar |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
74 foobar |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
75 :w! |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
76 :bwipe! |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
77 :e Xtestfile |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
78 foobar |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
79 :set key= |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
80 uu:w >>test.out |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
81 :" |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
82 :" |
2438
9614fe67034c
Fix test 72 not setting encryption method. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2267
diff
changeset
|
83 :" With encryption, cryptmethod=blowfish |
2239
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
84 :e! Xtestfile |
6122 | 85 rubbish |
2438
9614fe67034c
Fix test 72 not setting encryption method. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2267
diff
changeset
|
86 :set undofile cm=blowfish |
2459
64df5d008ccb
Fix: test 69 didn't work on MS-Windows. Test 72 beeped too often.
Bram Moolenaar <bram@vim.org>
parents:
2456
diff
changeset
|
87 ggdGijan |
2239
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
88 feb |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
89 mar |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
90 apr |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
91 jun:set ul=100 |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
92 kk0ifoo :set ul=100 |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
93 dd:set ul=100 |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
94 ibar :set ul=100 |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
95 :X |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
96 foobar |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
97 foobar |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
98 :w! |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
99 :bwipe! |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
100 :e Xtestfile |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
101 foobar |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
102 :set key= |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
103 /bar |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
104 :.w >>test.out |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
105 u:.w >>test.out |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
106 u:.w >>test.out |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
107 u:.w >>test.out |
732cb7b31956
Crypt the text in the undo file if the file itself is crypted.
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
108 :" |
6122 | 109 :" With encryption, cryptmethod=blowfish2 |
110 :e! Xtestfile | |
111 rubbish | |
112 :set undofile cm=blowfish2 | |
113 ggdGijan | |
114 feb | |
115 mar | |
116 apr | |
117 jun:set ul=100 | |
118 kk0ifoo :set ul=100 | |
119 dd:set ul=100 | |
120 ibar :set ul=100 | |
121 :X | |
122 foo2bar | |
123 foo2bar | |
124 :w! | |
125 :bwipe! | |
126 :e Xtestfile | |
127 foo2bar | |
128 :set key= | |
129 /bar | |
130 :.w >>test.out | |
131 u:.w >>test.out | |
132 u:.w >>test.out | |
133 u:.w >>test.out | |
134 :" | |
2232
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
135 :" Rename the undo file so that it gets cleaned up. |
5704 | 136 :if has("vms") |
137 : call rename("_un_Xtestfile", "Xtestundo") | |
138 :else | |
139 : call rename(".Xtestfile.un~", "Xtestundo") | |
140 :endif | |
2232
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
141 :qa! |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
142 ENDTEST |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
143 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
144 1111 ----- |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
145 2222 ----- |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
146 |
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
147 123456789 |