diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-09-03 23:37:01 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-09-03 23:37:01 +0200 |
commit | 5d712e4672c6c8cf7f35cfb7d8eb7e8aa24062ac (patch) | |
tree | 3a3c86381e334826dcb14488a182e4ce82a11890 | |
parent | d570ab95d9ab0616f7d7cff59302617e612eae41 (diff) | |
download | vim-git-5d712e4672c6c8cf7f35cfb7d8eb7e8aa24062ac.tar.gz |
patch 8.1.1972: no proper test for getchar()v8.1.1972
Problem: No proper test for getchar().
Solution: Add a test with special characters.
-rw-r--r-- | src/testdir/test_functions.vim | 17 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index 20718bcc0..d5ce5f02b 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -1314,6 +1314,23 @@ func Test_inputsecret() unlet g:typed2 endfunc +func Test_getchar() + call feedkeys('a', '') + call assert_equal(char2nr('a'), getchar()) + + call test_setmouse(1, 3) + let v:mouse_win = 9 + let v:mouse_winid = 9 + let v:mouse_lnum = 9 + let v:mouse_col = 9 + call feedkeys("\<S-LeftMouse>", '') + call assert_equal("\<S-LeftMouse>", getchar()) + call assert_equal(1, v:mouse_win) + call assert_equal(win_getid(1), v:mouse_winid) + call assert_equal(1, v:mouse_lnum) + call assert_equal(3, v:mouse_col) +endfunc + func Test_libcall_libcallnr() if !has('libcall') return diff --git a/src/version.c b/src/version.c index 85526b66b..321da5103 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1972, +/**/ 1971, /**/ 1970, |