Patch 8.1.1790

15 views
Skip to first unread message

Bram Moolenaar

unread,
Aug 1, 2019, 5:06:11 PM8/1/19
to vim...@googlegroups.com

Patch 8.1.1790
Problem: :mkvimrc is not tested.
Solution: Add a test.
Files: src/testdir/test_mksession.vim


*** ../vim-8.1.1789/src/testdir/test_mksession.vim 2019-06-23 00:49:50.985715087 +0200
--- src/testdir/test_mksession.vim 2019-08-01 23:03:29.462957315 +0200
***************
*** 536,540 ****
--- 536,582 ----
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
*** ../vim-8.1.1789/src/version.c 2019-08-01 22:40:27.068043894 +0200
--- src/version.c 2019-08-01 23:04:25.066591592 +0200
***************
*** 775,776 ****
--- 775,778 ----
{ /* Add new patch number below this line */
+ /**/
+ 1790,
/**/

--
login: yes
password: I don't know, please tell me
password is incorrect
login: yes
password: incorrect

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages