diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-01 23:05:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-01 23:05:49 +0200 |
commit | 8750026a7f6b445c43adc990141a3fe92d680b62 (patch) | |
tree | 22cf47fb678bc9cd22e79dce3c8be40710cb8f0e | |
parent | 90f3e7ac56056ffad50bac9d4497b5830c37ab26 (diff) | |
download | vim-git-8750026a7f6b445c43adc990141a3fe92d680b62.tar.gz |
patch 8.1.1790: :mkvimrc is not testedv8.1.1790
Problem: :mkvimrc is not tested.
Solution: Add a test.
-rw-r--r-- | src/testdir/test_mksession.vim | 42 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 44 insertions, 0 deletions
diff --git a/src/testdir/test_mksession.vim b/src/testdir/test_mksession.vim index 078b8a04f..62f14547b 100644 --- a/src/testdir/test_mksession.vim +++ b/src/testdir/test_mksession.vim @@ -536,5 +536,47 @@ 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 diff --git a/src/version.c b/src/version.c index 723a1c152..81f59f944 100644 --- a/src/version.c +++ b/src/version.c @@ -774,6 +774,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1790, +/**/ 1789, /**/ 1788, |