Mercurial > vim
comparison src/testdir/test_ex_mode.vim @ 19536:bab20768e1fd v8.2.0325
patch 8.2.0325: ex_getln.c code not covered by tests
Commit: https://github.com/vim/vim/commit/578fe947e3ad0cc7313c798cf76cc43dbf9b4ea6
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Feb 27 21:32:51 2020 +0100
patch 8.2.0325: ex_getln.c code not covered by tests
Problem: Ex_getln.c code not covered by tests.
Solution: Add a few more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5702)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 27 Feb 2020 21:45:04 +0100 |
parents | cb73f4ae6b7c |
children | 43c04edcafec |
comparison
equal
deleted
inserted
replaced
19535:b8ce0a9d1657 | 19536:bab20768e1fd |
---|---|
114 " Test for :g/pat/visual to run vi commands in Ex mode | 114 " Test for :g/pat/visual to run vi commands in Ex mode |
115 " This used to hang Vim before 8.2.0274. | 115 " This used to hang Vim before 8.2.0274. |
116 func Test_Ex_global() | 116 func Test_Ex_global() |
117 new | 117 new |
118 call setline(1, ['', 'foo', 'bar', 'foo', 'bar', 'foo']) | 118 call setline(1, ['', 'foo', 'bar', 'foo', 'bar', 'foo']) |
119 call feedkeys("Qg/bar/visual\<CR>$rxQ$ryQvisual\<CR>j", "xt") | 119 call feedkeys("Q\<bs>g/bar/visual\<CR>$rxQ$ryQvisual\<CR>j", "xt") |
120 call assert_equal('bax', getline(3)) | 120 call assert_equal('bax', getline(3)) |
121 call assert_equal('bay', getline(5)) | 121 call assert_equal('bay', getline(5)) |
122 bwipe! | 122 bwipe! |
123 endfunc | 123 endfunc |
124 | 124 |
125 " In Ex-mode, a backslash escapes a newline | |
126 func Test_Ex_escape_enter() | |
127 call feedkeys("gQlet l = \"a\\\<kEnter>b\"\<cr>vi\<cr>", 'xt') | |
128 call assert_equal("a\rb", l) | |
129 endfunc | |
130 | |
125 " vim: shiftwidth=2 sts=2 expandtab | 131 " vim: shiftwidth=2 sts=2 expandtab |