diff options
| author | Daniel Hahler <git@thequod.de> | 2019-08-26 10:23:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-26 10:23:12 +0200 |
| commit | b12b01a82890d4b2fb424ac9e2f8a0ad4c5d4706 (patch) | |
| tree | 4d1a9a02382466c1ad05d606ec8c38bafea17373 /src/nvim/testdir | |
| parent | f79079947411e39ae529f98e83204ee9f7e05300 (diff) | |
| parent | 233597152a49748aff5e4851bd4bcdeabb4a66fd (diff) | |
| download | rneovim-b12b01a82890d4b2fb424ac9e2f8a0ad4c5d4706.tar.gz rneovim-b12b01a82890d4b2fb424ac9e2f8a0ad4c5d4706.tar.bz2 rneovim-b12b01a82890d4b2fb424ac9e2f8a0ad4c5d4706.zip | |
Merge pull request #10850 from blueyed/option-alias
findoption_len: treat viminfo/viminfofile as aliases
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_mksession.vim | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim index 4e6d96ee48..0e56ed2ff3 100644 --- a/src/nvim/testdir/test_mksession.vim +++ b/src/nvim/testdir/test_mksession.vim @@ -267,4 +267,46 @@ func Test_mksession_quote_in_filename() call delete('Xtest_mks_quoted.out') endfunc +func s:ClearMappings() + mapclear + omapclear + mapclear! + lmapclear + tmapclear +endfunc + +func Test_mkvimrc() + let entries = [ + \ ['', 'nothing', '<Nop>'], + \ ['n', 'normal', 'NORMAL'], + \ ['v', 'visual', 'VISUAL'], + \ ['s', 'select', 'SELECT'], + \ ['x', 'visualonly', 'VISUALONLY'], + \ ['o', 'operator', 'OPERATOR'], + \ ['i', 'insert', 'INSERT'], + \ ['l', 'lang', 'LANG'], + \ ['c', 'command', 'COMMAND'], + \ ['t', 'terminal', 'TERMINAL'], + \ ] + for entry in entries + exe entry[0] .. 'map ' .. entry[1] .. ' ' .. entry[2] + endfor + + mkvimrc Xtestvimrc + + call s:ClearMappings() + for entry in entries + call assert_equal('', maparg(entry[1], entry[0])) + endfor + + source Xtestvimrc + + for entry in entries + call assert_equal(entry[2], maparg(entry[1], entry[0])) + endfor + + call s:ClearMappings() + call delete('Xtestvimrc') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |