forked from aniani/vim
patch 8.0.1221: 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 #2256)
This commit is contained in:
@@ -31,3 +31,33 @@ func Test_source_latin()
|
||||
bwipe!
|
||||
call delete('Xscript')
|
||||
endfunc
|
||||
|
||||
" Test for sourcing a file with CTRL-V's at the end of the line
|
||||
func Test_source_ctrl_v()
|
||||
call writefile(['map __1 afirst',
|
||||
\ 'map __2 asecond',
|
||||
\ 'map __3 athird',
|
||||
\ 'map __4 afourth',
|
||||
\ 'map __5 afifth',
|
||||
\ "map __1 asd\<C-V>",
|
||||
\ "map __2 asd\<C-V>\<C-V>",
|
||||
\ "map __3 asd\<C-V>\<C-V>",
|
||||
\ "map __4 asd\<C-V>\<C-V>\<C-V>",
|
||||
\ "map __5 asd\<C-V>\<C-V>\<C-V>",
|
||||
\ ], 'Xtestfile')
|
||||
source Xtestfile
|
||||
enew!
|
||||
exe "normal __1\<Esc>\<Esc>__2\<Esc>__3\<Esc>\<Esc>__4\<Esc>__5\<Esc>"
|
||||
exe "%s/\<C-J>/0/g"
|
||||
call assert_equal(['sd',
|
||||
\ "map __2 asd\<Esc>secondsd\<Esc>sd0map __5 asd0fifth"],
|
||||
\ getline(1, 2))
|
||||
|
||||
enew!
|
||||
call delete('Xtestfile')
|
||||
unmap __1
|
||||
unmap __2
|
||||
unmap __3
|
||||
unmap __4
|
||||
unmap __5
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user