Mercurial > vim
comparison src/testdir/test_tagjump.vim @ 19625:f70a3c1000bb v8.2.0369
patch 8.2.0369: various Normal mode commands not fully tested
Commit: https://github.com/vim/vim/commit/1671f4488105ee12a6a8558ae351436c26ab55fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 10 07:48:13 2020 +0100
patch 8.2.0369: various Normal mode commands not fully tested
Problem: Various Normal mode commands not fully tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5751)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 10 Mar 2020 08:00:06 +0100 |
parents | 67fbe280a502 |
children | c087099e9163 |
comparison
equal
deleted
inserted
replaced
19624:ce4838c19ca1 | 19625:f70a3c1000bb |
---|---|
1138 close! | 1138 close! |
1139 endfunc | 1139 endfunc |
1140 | 1140 |
1141 " Test for :dsearch, :dlist, :djump and :dsplit commands | 1141 " Test for :dsearch, :dlist, :djump and :dsplit commands |
1142 " Test for [d, ]d, [D, ]D, [ CTRL-D, ] CTRL-D and CTRL-W d commands | 1142 " Test for [d, ]d, [D, ]D, [ CTRL-D, ] CTRL-D and CTRL-W d commands |
1143 func Test_def_search() | 1143 func Test_macro_search() |
1144 new | 1144 new |
1145 call setline(1, ['#define FOO 1', '#define FOO 2', '#define FOO 3', | 1145 call setline(1, ['#define FOO 1', '#define FOO 2', '#define FOO 3', |
1146 \ '#define FOO 4', '#define FOO 5']) | 1146 \ '#define FOO 4', '#define FOO 5']) |
1147 call cursor(3, 9) | 1147 call cursor(3, 9) |
1148 | 1148 |
1234 call assert_fails('dsplit BAR', 'E388:') | 1234 call assert_fails('dsplit BAR', 'E388:') |
1235 | 1235 |
1236 close! | 1236 close! |
1237 endfunc | 1237 endfunc |
1238 | 1238 |
1239 " Test for [*, [/, ]* and ]/ | |
1240 func Test_comment_search() | |
1241 new | |
1242 call setline(1, ['', '/*', ' *', ' *', ' */']) | |
1243 normal! 4gg[/ | |
1244 call assert_equal([2, 1], [line('.'), col('.')]) | |
1245 normal! 3gg[* | |
1246 call assert_equal([2, 1], [line('.'), col('.')]) | |
1247 normal! 3gg]/ | |
1248 call assert_equal([5, 3], [line('.'), col('.')]) | |
1249 normal! 3gg]* | |
1250 call assert_equal([5, 3], [line('.'), col('.')]) | |
1251 %d | |
1252 call setline(1, ['', '/*', ' *', ' *']) | |
1253 call assert_beeps('normal! 3gg]/') | |
1254 %d | |
1255 call setline(1, ['', ' *', ' *', ' */']) | |
1256 call assert_beeps('normal! 4gg[/') | |
1257 %d | |
1258 call setline(1, ' /* comment */') | |
1259 normal! 15|[/ | |
1260 call assert_equal(9, col('.')) | |
1261 normal! 15|]/ | |
1262 call assert_equal(21, col('.')) | |
1263 call setline(1, ' comment */') | |
1264 call assert_beeps('normal! 15|[/') | |
1265 call setline(1, ' /* comment') | |
1266 call assert_beeps('normal! 15|]/') | |
1267 close! | |
1268 endfunc | |
1269 | |
1239 " vim: shiftwidth=2 sts=2 expandtab | 1270 " vim: shiftwidth=2 sts=2 expandtab |