Mercurial > vim
annotate src/testdir/test75.in @ 9731:f85d94eee05b v7.4.2141
commit https://github.com/vim/vim/commit/ba96e9af388804364425185b47eed14988302865
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 1 17:10:20 2016 +0200
patch 7.4.2141
Problem: Coverity reports bogus NULL check.
Solution: When checking for a variable in the funccal scope don't pass the
varname.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 01 Aug 2016 17:15:06 +0200 |
parents | dd3dac42cb9b |
children |
rev | line source |
---|---|
5405 | 1 Tests for maparg(). |
5718 | 2 Also test utf8 map with a 0x80 byte. |
2610 | 3 |
4 STARTTEST | |
5 :so small.vim | |
5718 | 6 :so mbyte.vim |
3026 | 7 :set cpo-=< |
5718 | 8 :set encoding=utf8 |
2610 | 9 :" Test maparg() with a string result |
10 :map foo<C-V> is<F4>foo | |
11 :vnoremap <script> <buffer> <expr> <silent> bar isbar | |
12 :call append('$', maparg('foo<C-V>')) | |
13 :call append('$', string(maparg('foo<C-V>', '', 0, 1))) | |
14 :call append('$', string(maparg('bar', '', 0, 1))) | |
5035
1cf89d38aa76
updated for version 7.3.1261
Bram Moolenaar <bram@vim.org>
parents:
3026
diff
changeset
|
15 :map <buffer> <nowait> foo bar |
1cf89d38aa76
updated for version 7.3.1261
Bram Moolenaar <bram@vim.org>
parents:
3026
diff
changeset
|
16 :call append('$', string(maparg('foo', '', 0, 1))) |
2610 | 17 :" |
3026 | 18 :map abc x<char-114>x |
19 :call append('$', maparg('abc')) | |
20 :map abc y<S-char-114>y | |
21 :call append('$', maparg('abc')) | |
22 :" | |
5718 | 23 Go:" |
24 :" Outside of the range, minimum | |
25 :inoremap <Char-0x1040> a | |
6195 | 26 :execute "normal a\u1040\<Esc>" |
5718 | 27 :" Inside of the range, minimum |
28 :inoremap <Char-0x103f> b | |
6195 | 29 :execute "normal a\u103f\<Esc>" |
5718 | 30 :" Inside of the range, maximum |
31 :inoremap <Char-0xf03f> c | |
6195 | 32 :execute "normal a\uf03f\<Esc>" |
5718 | 33 :" Outside of the range, maximum |
34 :inoremap <Char-0xf040> d | |
6195 | 35 :execute "normal a\uf040\<Esc>" |
5718 | 36 :" |
2610 | 37 :/^eof/+1,$w! test.out |
38 :qa! | |
39 ENDTEST | |
40 | |
41 eof |