comparison src/testdir/test_ex_mode.vim @ 19570:43c04edcafec v8.2.0342

patch 8.2.0342: some code in ex_getln.c not covered by tests Commit: https://github.com/vim/vim/commit/0546d7df13b041833121b2d56036e1c62ea3b0c1 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 1 16:53:09 2020 +0100 patch 8.2.0342: some code in ex_getln.c not covered by tests Problem: Some code in ex_getln.c not covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5717)
author Bram Moolenaar <Bram@vim.org>
date Sun, 01 Mar 2020 17:00:06 +0100
parents bab20768e1fd
children 848dc460adf0
comparison
equal deleted inserted replaced
19569:be76a82ee030 19570:43c04edcafec
47 call assert_equal([' 1', "1\<C-t>\<C-t>"], Ex("1\<C-t>\<C-t>"), e) 47 call assert_equal([' 1', "1\<C-t>\<C-t>"], Ex("1\<C-t>\<C-t>"), e)
48 call assert_equal([' 1', "1\<C-t>\<C-t>"], Ex("1\<C-t>\<C-t>\<C-d>"), e) 48 call assert_equal([' 1', "1\<C-t>\<C-t>"], Ex("1\<C-t>\<C-t>\<C-d>"), e)
49 call assert_equal([' foo', ' foo'], Ex(" foo\<C-d>"), e) 49 call assert_equal([' foo', ' foo'], Ex(" foo\<C-d>"), e)
50 call assert_equal(['foo', ' foo0'], Ex(" foo0\<C-d>"), e) 50 call assert_equal(['foo', ' foo0'], Ex(" foo0\<C-d>"), e)
51 call assert_equal(['foo', ' foo^'], Ex(" foo^\<C-d>"), e) 51 call assert_equal(['foo', ' foo^'], Ex(" foo^\<C-d>"), e)
52 call assert_equal(['foo', 'foo'],
53 \ Ex("\<BS>\<C-H>\<Del>foo"), e)
52 endfor 54 endfor
53 55
54 set sw& 56 set sw&
55 let &encoding = encoding_save 57 let &encoding = encoding_save
56 endfunc 58 endfunc
126 func Test_Ex_escape_enter() 128 func Test_Ex_escape_enter()
127 call feedkeys("gQlet l = \"a\\\<kEnter>b\"\<cr>vi\<cr>", 'xt') 129 call feedkeys("gQlet l = \"a\\\<kEnter>b\"\<cr>vi\<cr>", 'xt')
128 call assert_equal("a\rb", l) 130 call assert_equal("a\rb", l)
129 endfunc 131 endfunc
130 132
133 " Test for :append! command in Ex mode
134 func Test_Ex_append()
135 new
136 call setline(1, "\t abc")
137 call feedkeys("Qappend!\npqr\nxyz\n.\nvisual\n", 'xt')
138 call assert_equal(["\t abc", "\t pqr", "\t xyz"], getline(1, '$'))
139 close!
140 endfunc
141
131 " vim: shiftwidth=2 sts=2 expandtab 142 " vim: shiftwidth=2 sts=2 expandtab