mirror of
https://github.com/vim/vim.git
synced 2025-10-10 06:24:10 -04:00
patch 8.2.0347: various code not covered by tests
Problem: Various code not covered by tests. Solution: Add more test coverage. (Yegappan Lakshmanan, closes #5720)
This commit is contained in:
@@ -50,7 +50,11 @@ func Test_ex_mode()
|
||||
call assert_equal(['foo', ' foo0'], Ex(" foo0\<C-d>"), e)
|
||||
call assert_equal(['foo', ' foo^'], Ex(" foo^\<C-d>"), e)
|
||||
call assert_equal(['foo', 'foo'],
|
||||
\ Ex("\<BS>\<C-H>\<Del>foo"), e)
|
||||
\ Ex("\<BS>\<C-H>\<Del>\<kDel>foo"), e)
|
||||
" default wildchar <Tab> interferes with this test
|
||||
set wildchar=<c-e>
|
||||
call assert_equal(["a\tb", "a\tb"], Ex("a\t\t\<C-H>b"), e)
|
||||
set wildchar&
|
||||
endfor
|
||||
|
||||
set sw&
|
||||
@@ -139,4 +143,18 @@ func Test_Ex_append()
|
||||
close!
|
||||
endfunc
|
||||
|
||||
" In Ex-mode, backslashes at the end of a command should be halved.
|
||||
func Test_Ex_echo_backslash()
|
||||
" This test works only when the language is English
|
||||
if v:lang != "C" && v:lang !~ '^[Ee]n'
|
||||
return
|
||||
endif
|
||||
let bsl = '\\\\'
|
||||
let bsl2 = '\\\'
|
||||
call assert_fails('call feedkeys("Qecho " .. bsl .. "\nvisual\n", "xt")',
|
||||
\ "E15: Invalid expression: \\\\")
|
||||
call assert_fails('call feedkeys("Qecho " .. bsl2 .. "\nm\nvisual\n", "xt")',
|
||||
\ "E15: Invalid expression: \\\nm")
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Reference in New Issue
Block a user