To: vim_dev@googlegroups.com Subject: Patch 7.4.1271 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1271 Problem: assert_false(v:false) reports an error. (Nikolai Pavlov) Solution: Recognize v:true and v:false. (Closes #625) Files: src/eval.c, src/testdir/test_assert.vim *** ../vim-7.4.1270/src/eval.c 2016-02-06 18:09:53.075952875 +0100 --- src/eval.c 2016-02-06 20:16:58.029028932 +0100 *************** *** 9216,9221 **** --- 9216,9224 ---- int error = FALSE; garray_T ga; + if (argvars[0].v_type == VAR_SPECIAL + && argvars[0].vval.v_number == (isTrue ? VVAL_TRUE : VV_FALSE)) + return; if (argvars[0].v_type != VAR_NUMBER || (get_tv_number_chk(&argvars[0], &error) == 0) == isTrue || error) *** ../vim-7.4.1270/src/testdir/test_assert.vim 2016-01-31 16:28:00.609674294 +0100 --- src/testdir/test_assert.vim 2016-02-06 20:09:51.569451592 +0100 *************** *** 2,12 **** --- 2,14 ---- func Test_assert_false() call assert_false(0) + call assert_false(v:false) endfunc func Test_assert_true() call assert_true(1) call assert_true(123) + call assert_true(v:true) endfunc func Test_assert_equal() *** ../vim-7.4.1270/src/version.c 2016-02-06 19:57:11.601323655 +0100 --- src/version.c 2016-02-06 20:16:17.877446163 +0100 *************** *** 744,745 **** --- 744,747 ---- { /* Add new patch number below this line */ + /**/ + 1271, /**/ -- hundred-and-one symptoms of being an internet addict: 162. You go outside and look for a brightness knob to turn down the sun. /// 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 ///