Mercurial > vim
comparison src/testdir/test_paste.vim @ 20941:505d97ea54da v8.2.1022
patch 8.2.1022: various parts of code not covered by tests
Commit: https://github.com/vim/vim/commit/845e0ee59430eac07e74b6cb92020e420d17953d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 20 16:05:32 2020 +0200
patch 8.2.1022: various parts of code not covered by tests
Problem: Various parts of code not covered by tests.
Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6300)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 Jun 2020 16:15:04 +0200 |
parents | 853afcc375b2 |
children | 08940efa6b4e |
comparison
equal
deleted
inserted
replaced
20940:88ce5327f213 | 20941:505d97ea54da |
---|---|
77 exe "normal i\<C-R>+\<Esc>" | 77 exe "normal i\<C-R>+\<Esc>" |
78 call assert_equal("nasty\<Esc>:!ls\<CR>command", getline(1)) | 78 call assert_equal("nasty\<Esc>:!ls\<CR>command", getline(1)) |
79 bwipe! | 79 bwipe! |
80 endfunc | 80 endfunc |
81 | 81 |
82 " bracketed paste in command line | |
82 func Test_paste_cmdline() | 83 func Test_paste_cmdline() |
83 call feedkeys(":a\<Esc>[200~foo\<CR>bar\<Esc>[201~b\<Home>\"\<CR>", 'xt') | 84 call feedkeys(":a\<Esc>[200~foo\<CR>bar\<Esc>[201~b\<Home>\"\<CR>", 'xt') |
84 call assert_equal("\"afoo\<CR>barb", getreg(':')) | 85 call assert_equal("\"afoo\<CR>barb", getreg(':')) |
86 endfunc | |
87 | |
88 " bracketed paste in Ex-mode | |
89 func Test_paste_ex_mode() | |
90 unlet! foo | |
91 call feedkeys("Qlet foo=\"\<Esc>[200~foo\<CR>bar\<Esc>[201~\"\<CR>vi\<CR>", 'xt') | |
92 call assert_equal("foo\rbar", foo) | |
93 endfunc | |
94 | |
95 func Test_paste_onechar() | |
96 new | |
97 let @f='abc' | |
98 call feedkeys("i\<C-R>\<Esc>[200~foo\<CR>bar\<Esc>[201~", 'xt') | |
99 call assert_equal("abc", getline(1)) | |
100 close! | |
85 endfunc | 101 endfunc |
86 | 102 |
87 func Test_paste_visual_mode() | 103 func Test_paste_visual_mode() |
88 new | 104 new |
89 call setline(1, 'here are some words') | 105 call setline(1, 'here are some words') |
132 exe "xrestore " .. display | 148 exe "xrestore " .. display |
133 call CheckCopyPaste() | 149 call CheckCopyPaste() |
134 | 150 |
135 bwipe! | 151 bwipe! |
136 endfunc | 152 endfunc |
153 | |
154 " vim: shiftwidth=2 sts=2 expandtab |