To: vim_dev@googlegroups.com Subject: Patch 8.1.1821 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1821 Problem: No test for wrong number of method arguments. Solution: Add a test. Files: src/testdir/test_method.vim *** ../vim-8.1.1820/src/testdir/test_method.vim 2019-08-05 23:10:06.661422313 +0200 --- src/testdir/test_method.vim 2019-08-05 23:13:49.344615035 +0200 *************** *** 97,104 **** --- 97,114 ---- let FuncRef = function('Concat') eval 'foo'->FuncRef('bar', 'tail')->assert_equal('foobartail') + " not enough arguments + call assert_fails("eval 'foo'->FuncRef('bar')", 'E119:') + " too many arguments + call assert_fails("eval 'foo'->FuncRef('bar', 'tail', 'four')", 'E118:') + let Partial = function('Concat', ['two']) eval 'one'->Partial('three')->assert_equal('onetwothree') + " not enough arguments + call assert_fails("eval 'one'->Partial()", 'E119:') + " too many arguments + call assert_fails("eval 'one'->Partial('three', 'four')", 'E118:') + delfunc Concat endfunc *** ../vim-8.1.1820/src/version.c 2019-08-05 23:10:06.661422313 +0200 --- src/version.c 2019-08-06 20:33:49.644557928 +0200 *************** *** 775,776 **** --- 775,778 ---- { /* Add new patch number below this line */ + /**/ + 1821, /**/ -- In many of the more relaxed civilizations on the Outer Eastern Rim of the Galaxy, "The Hitchhiker's Guide to the Galaxy" has already supplanted the great "Encyclopedia Galactica" as the standard repository of all knowledge and wisdom, for though it has many omissions and contains much that is apocryphal, or at least wildly inaccurate, it scores over the older, more pedestrian work in two important respects. First, it is slightly cheaper; and second, it has the words "DON'T PANIC" inscribed in large friendly letters on its cover. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// Bram Moolenaar -- Bram@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 ///