comparison src/testdir/test_normal.vim @ 12788:cb9b2774f21f v8.0.1271

patch 8.0.1271: still too many old style tests commit https://github.com/vim/vim/commit/fb094e14c19337de824d4e6710ca6a2617930ab0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 5 20:59:28 2017 +0100 patch 8.0.1271: still too many old style tests Problem: Still too many old style tests. Solution: Convert a few more tests to new style. (Yegappan Lakshmanan, closes #2290)
author Christian Brabandt <cb@256bit.org>
date Sun, 05 Nov 2017 21:00:04 +0100
parents 6fa9f6b4d159
children 4d2ee1564c97
comparison
equal deleted inserted replaced
12787:65546ba95150 12788:cb9b2774f21f
2394 call assert_equal('á', getline(1)) 2394 call assert_equal('á', getline(1))
2395 normal grád} 2395 normal grád}
2396 call assert_equal('', getline(1)) 2396 call assert_equal('', getline(1))
2397 bwipe! 2397 bwipe!
2398 endfunc 2398 endfunc
2399
2400 " Test for the gr (virtual replace) command
2401 " Test for the bug fixed by 7.4.387
2402 func Test_gr_command()
2403 enew!
2404 let save_cpo = &cpo
2405 call append(0, ['First line', 'Second line', 'Third line'])
2406 exe "normal i\<C-G>u"
2407 call cursor(2, 1)
2408 set cpo-=X
2409 normal 4gro
2410 call assert_equal('oooond line', getline(2))
2411 undo
2412 set cpo+=X
2413 normal 4gro
2414 call assert_equal('ooooecond line', getline(2))
2415 let &cpo = save_cpo
2416 enew!
2417 endfunc
2418
2419 " When splitting a window the changelist position is wrong.
2420 " Test the changelist position after splitting a window.
2421 " Test for the bug fixed by 7.4.386
2422 func Test_changelist()
2423 let save_ul = &ul
2424 enew!
2425 call append('$', ['1', '2'])
2426 exe "normal i\<C-G>u"
2427 exe "normal Gkylpa\<C-G>u"
2428 set ul=100
2429 exe "normal Gylpa\<C-G>u"
2430 set ul=100
2431 normal gg
2432 vsplit
2433 normal g;
2434 call assert_equal([3, 2], [line('.'), col('.')])
2435 normal g;
2436 call assert_equal([2, 2], [line('.'), col('.')])
2437 call assert_fails('normal g;', 'E662:')
2438 %bwipe!
2439 let &ul = save_ul
2440 endfunc