comparison src/testdir/test_edit.vim @ 20285:bce10d039e06 v8.2.0698

patch 8.2.0698: insert mode completion not fully tested Commit: https://github.com/vim/vim/commit/f9ab52e155dc13f59b654d754041fe78e17b9074 Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 5 19:57:18 2020 +0200 patch 8.2.0698: insert mode completion not fully tested Problem: Insert mode completion not fully tested. Solution: Add a few more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6041)
author Bram Moolenaar <Bram@vim.org>
date Tue, 05 May 2020 20:00:05 +0200
parents 06a1dd50463e
children 045442aa392b
comparison
equal deleted inserted replaced
20284:7b7c9d3abf7c 20285:bce10d039e06
326 set nocindent indentexpr= 326 set nocindent indentexpr=
327 delfu Do_Indent 327 delfu Do_Indent
328 bw! 328 bw!
329 endfunc 329 endfunc
330 330
331 " Test changing indent in replace mode
331 func Test_edit_12() 332 func Test_edit_12()
332 " Test changing indent in replace mode
333 new 333 new
334 call setline(1, ["\tabc", "\tdef"]) 334 call setline(1, ["\tabc", "\tdef"])
335 call cursor(2, 4) 335 call cursor(2, 4)
336 call feedkeys("R^\<c-d>", 'tnix') 336 call feedkeys("R^\<c-d>", 'tnix')
337 call assert_equal(["\tabc", "def"], getline(1, '$')) 337 call assert_equal(["\tabc", "def"], getline(1, '$'))
366 call setline(1, ["\tabc", "\t\tdef"]) 366 call setline(1, ["\tabc", "\t\tdef"])
367 call cursor(2, 2) 367 call cursor(2, 2)
368 call feedkeys("R\<c-t>\<c-t>", 'tnix') 368 call feedkeys("R\<c-t>\<c-t>", 'tnix')
369 call assert_equal(["\tabc", "\t\t\tdef"], getline(1, '$')) 369 call assert_equal(["\tabc", "\t\t\tdef"], getline(1, '$'))
370 call assert_equal([0, 2, 2, 0], getpos('.')) 370 call assert_equal([0, 2, 2, 0], getpos('.'))
371 set et 371 set sw&
372 set sw& et& 372
373 %d 373 " In replace mode, after hitting enter in a line with tab characters,
374 call setline(1, ["\t/*"]) 374 " pressing backspace should restore the tab characters.
375 set formatoptions=croql 375 %d
376 call cursor(1, 3) 376 setlocal autoindent backspace=2
377 call feedkeys("A\<cr>\<cr>/", 'tnix') 377 call setline(1, "\tone\t\ttwo")
378 call assert_equal(["\t/*", " *", " */"], getline(1, '$')) 378 exe "normal ggRred\<CR>six" .. repeat("\<BS>", 8)
379 set formatoptions& 379 call assert_equal(["\tone\t\ttwo"], getline(1, '$'))
380 bw! 380 bw!
381 endfunc 381 endfunc
382 382
383 func Test_edit_13() 383 func Test_edit_13()
384 " Test smartindenting 384 " Test smartindenting