comparison src/testdir/test_ex_mode.vim @ 19370:02111977dd05 v8.2.0243

patch 8.2.0243: insufficient code coverage for ex_docmd.c functions Commit: https://github.com/vim/vim/commit/9f6277bdde97b7767ded43a0b5a2023eb601b3b7 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 11 22:04:02 2020 +0100 patch 8.2.0243: insufficient code coverage for ex_docmd.c functions Problem: Insufficient code coverage for ex_docmd.c functions. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5618)
author Bram Moolenaar <Bram@vim.org>
date Tue, 11 Feb 2020 22:15:04 +0100
parents 2f0f308c069c
children 67fbe280a502
comparison
equal deleted inserted replaced
19369:05c259d4233d 19370:02111977dd05
82 82
83 call term_sendkeys(buf, ":q!\n") 83 call term_sendkeys(buf, ":q!\n")
84 call StopVimInTerminal(buf) 84 call StopVimInTerminal(buf)
85 endfunc 85 endfunc
86 86
87 " Test for displaying lines from an empty buffer in Ex mode
88 func Test_Ex_emptybuf()
89 new
90 call assert_fails('call feedkeys("Q\<CR>", "xt")', 'E749:')
91 call setline(1, "abc")
92 call assert_fails('call feedkeys("Q\<CR>", "xt")', 'E501:')
93 call assert_fails('call feedkeys("Q%d\<CR>", "xt")', 'E749:')
94 close!
95 endfunc
96
97 " Test for the :open command
98 func Test_open_command()
99 new
100 call setline(1, ['foo foo', 'foo bar', 'foo baz'])
101 call feedkeys("Qopen\<CR>j", 'xt')
102 call assert_equal('foo bar', getline('.'))
103 call feedkeys("Qopen /bar/\<CR>", 'xt')
104 call assert_equal(5, col('.'))
105 call assert_fails('call feedkeys("Qopen /baz/\<CR>", "xt")', 'E479:')
106 close!
107 endfunc
108
87 " vim: shiftwidth=2 sts=2 expandtab 109 " vim: shiftwidth=2 sts=2 expandtab