comparison src/testdir/test_increment.in @ 6927:58d9f967ae1a v7.4.782

patch 7.4.782 Problem: Still a few problems with CTRL-A and CTRL-X in Visual mode. Solution: Fix the reported problems. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Fri, 17 Jul 2015 13:03:48 +0200
parents f9876721bedc
children b10995a2f7c3
comparison
equal deleted inserted replaced
6926:b2839b524d9f 6927:58d9f967ae1a
182 Expected: 182 Expected:
183 1) 'v' select last zero and first zeroes 183 1) 'v' select last zero and first zeroes
184 0 1 184 0 1
185 1 0 185 1 0
186 1 0 186 1 0
187
188 13) visually selected part of columns
189 Text:
190 max: 100px
191 max: 200px
192 max: 300px
193 max: 400px
194 Expected:
195 1) 'v' on first two numbers Ctrl-A
196 max: 110px
197 max: 220px
198 max: 330px
199 max: 400px
200 2) 'v' on first two numbers Ctrl-X
201 max: 90px
202 max: 190px
203 max: 290px
204 max: 400px
205
206 14) redo in block mode
207 Text:
208 1 1
209 1 1
210 Expected:
211 1) Ctrl-a on first column, redo on second column
212 2 2
213 2 2
214
215 15) block select single numbers
216 Text:
217 101
218 Expected:
219 1) Ctrl-a on visually selected zero
220 111
221
222 16) increment right aligned numbers
223 Text:
224 1
225 19
226 119
227 Expected:
228 1) Ctrl-a on line selected region
229 2
230 20
231 120
232
233 17) block-wise increment and redo
234 Text:
235 100
236 1
237
238 100
239 1
240
241 Expected:
242 1) Ctrl-V j $ on first block, afterwards '.' on second
243 101
244 2
245
246 101
247 2
248
249 18) repeat of g<Ctrl-a>
250 Text:
251 0
252 0
253 0
254 0
255
256 Expected:
257 1) V 4j g<ctrl-a>, repeat twice afterwards with .
258 3
259 6
260 9
261 12
262
263
187 264
188 STARTTEST 265 STARTTEST
189 :so small.vim 266 :so small.vim
190 :" 267 :"
191 :" Avoid CTRL-X being mapped in Visual mode for MS-Windows 268 :" Avoid CTRL-X being mapped in Visual mode for MS-Windows
198 f-v$:/^E1=/+3put a 275 f-v$:/^E1=/+3put a
199 f1v$:/^E1=/+4put a 276 f1v$:/^E1=/+4put a
200 f-v$:/^E1=/+5put a 277 f-v$:/^E1=/+5put a
201 f1v$ 278 f1v$
202 279
203 :" Test 22 280 :" Test 2
204 :/^S2=/+,/^E2=/-y a 281 :/^S2=/+,/^E2=/-y a
205 :/^E2=/+put a 282 :/^E2=/+put a
206 V3k$:.+put a 283 V3k$3j:.+put a
207 V3k$ 284 V3k$
208 285
209 :" Test 3 286 :" Test 3
210 :/^S3=/+,/^E3=/-y a 287 :/^S3=/+,/^E3=/-y a
211 :/^E3=/+put a 288 :/^E3=/+put a
212 V6k2g:.+put a 289 V6k2g6j:.+put a
213 V6k2g 290 V6k2g
214 291
215 :" Test 4 292 :" Test 4
216 :/^S4=/+,/^E4=/-y a 293 :/^S4=/+,/^E4=/-y a
217 :/^E4=/+put a 294 :/^E4=/+put a
227 :/^S6=/+,/^E6=/-y a 304 :/^S6=/+,/^E6=/-y a
228 :/^E6=/+put a 305 :/^E6=/+put a
229 v3kg 306 v3kg
230 307
231 :" Test 7 308 :" Test 7
309 :set nrformats&vim
232 :/^S7=/+,/^E7=/-y a 310 :/^S7=/+,/^E7=/-y a
233 :/^E7=/+put a 311 :/^E7=/+put a
234 V4k:.+put a 312 V4k4j:.+put a
235 V4k 313 V4k
236 314
237 :" Test 8 315 :" Test 8
238 :/^S8=/+,/^E8=/-y a 316 :/^S8=/+,/^E8=/-y a
239 :/^E8=/+put a 317 :/^E8=/+put a
240 kj$:.+put a 318 kj$j:.+put a
241 k$+ 319 k$+
242 320
243 :" Test 9 321 :" Test 9
244 :/^S9=/+,/^E9=/-y a 322 :/^S9=/+,/^E9=/-y a
245 :/^E9=/+put a 323 :/^E9=/+put a
246 5kVj22j. 324 5kVj23j.
247 325
248 :" Test 10 326 :" Test 10
249 :/^S10=/+,/^E10=/-y a 327 :/^S10=/+,/^E10=/-y a
250 :/^E10=/+put a 328 :/^E10=/+put a
251 V3kg 329 V3kg
257 335
258 :" Test 12 336 :" Test 12
259 :/^S12=/+,/^E12=/-y a 337 :/^S12=/+,/^E12=/-y a
260 :/^E12=/+put a 338 :/^E12=/+put a
261 2k$v++ 339 2k$v++
340
341 :" Test 13
342 :/^S13=/+,/^E13=/-y a
343 :/^E13=/+put a
344 3kf1l2j3j:.+put a
345 3kf1l2j
346
347 :" Test 14
348 :/^S14=/+,/^E14=/-y a
349 :/^E14=/+put a
350 kw.
351
352 :" Test 15
353 :/^S15=/+,/^E15=/-y a
354 :/^E15=/+put a
355 lv
356
357 :" Test 16
358 :/^S16=/+,/^E16=/-y a
359 :/^E16=/+put a
360 V3k
361
362 :" Test 17
363 :/^S17=/+,/^E17=/-y a
364 :/^E17=/+put a
365 4kj$2j.
366
367 :" Test 18
368 :/^S18=/+,/^E18=/-y a
369 :/^E18=/+put a
370 V3kg..
262 371
263 :" Save the report 372 :" Save the report
264 :/^# Test 1/,$w! test.out 373 :/^# Test 1/,$w! test.out
265 :qa! 374 :qa!
266 375
382 0 0 491 0 0
383 E12==== 492 E12====
384 493
385 494
386 495
496 # Test 13
497 S13====
498 max: 100px
499 max: 200px
500 max: 300px
501 max: 400px
502 E13====
503
504
505
506 # Test 14
507 S14====
508 1 1
509 1 1
510 E14====
511
512
513
514 # Test 15
515 S15====
516 101
517 E15====
518
519
520
521 # Test 16
522 S16====
523 1
524 19
525 119
526 E16====
527
528
529
530 # Test 17
531 S17====
532 100
533 1
534
535 100
536 1
537 E17====
538
539
540 # Test 18
541 S18====
542 0
543 0
544 0
545 0
546 E18====
387 547
388 548
389 549
390 550
391 551