comparison src/testdir/test_exists.vim @ 19407:2f4be7ca1b1b v8.2.0261

patch 8.2.0261: some code not covered by tests Commit: https://github.com/vim/vim/commit/f0cee1971f5258ce61f8a4e6a04d35c1e625bb01 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 16 13:33:56 2020 +0100 patch 8.2.0261: some code not covered by tests Problem: Some code not covered by tests. Solution: Add test cases. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5645)
author Bram Moolenaar <Bram@vim.org>
date Sun, 16 Feb 2020 13:45:04 +0100
parents 4767939d10cc
children 546bdeef35f1
comparison
equal deleted inserted replaced
19406:9f499efdf2aa 19407:2f4be7ca1b1b
92 call assert_equal(2, exists(':edit')) 92 call assert_equal(2, exists(':edit'))
93 " Valid internal command (full match) with garbage 93 " Valid internal command (full match) with garbage
94 call assert_equal(0, exists(':edit/a')) 94 call assert_equal(0, exists(':edit/a'))
95 " Valid internal command (partial match) 95 " Valid internal command (partial match)
96 call assert_equal(1, exists(':q')) 96 call assert_equal(1, exists(':q'))
97 " Valid internal command with a digit
98 call assert_equal(2, exists(':2match'))
97 " Non-existing internal command 99 " Non-existing internal command
98 call assert_equal(0, exists(':invalidcmd')) 100 call assert_equal(0, exists(':invalidcmd'))
101 " Internal command with a count
102 call assert_equal(0, exists(':3buffer'))
99 103
100 " User defined command (full match) 104 " User defined command (full match)
101 command! MyCmd :echo 'My command' 105 command! MyCmd :echo 'My command'
102 call assert_equal(2, exists(':MyCmd')) 106 call assert_equal(2, exists(':MyCmd'))
103 " User defined command (partial match) 107 " User defined command (partial match)