Patch 8.2.4476
Problem: Operator name spelled wrong.
Solution: Change trinary to ternary. (Goc Dundar, closes #9850)
Files: src/testdir/test_expr.vim, src/testdir/test_vim9_expr.vim,
src/testdir/test_vimscript.vim
*** ../vim-8.2.4475/src/testdir/test_expr.vim 2022-02-13 20:46:14.693026120
+0000
--- src/testdir/test_expr.vim 2022-02-26 11:34:43.664671651 +0000
***************
*** 43,49 ****
call assert_false(has('patch-9.9.1'))
endfunc
! func Test_op_trinary()
let lines =<< trim END
call assert_equal('yes', 1 ? 'yes' : 'no')
call assert_equal('no', 0 ? 'yes' : 'no')
--- 43,49 ----
call assert_false(has('patch-9.9.1'))
endfunc
! func Test_op_ternary()
let lines =<< trim END
call assert_equal('yes', 1 ? 'yes' : 'no')
call assert_equal('no', 0 ? 'yes' : 'no')
*** ../vim-8.2.4475/src/testdir/test_vim9_expr.vim 2022-02-17
19:44:04.275319369 +0000
--- src/testdir/test_vim9_expr.vim 2022-02-26 11:34:43.668671667 +0000
***************
*** 12,18 ****
enddef
" test cond ? expr : expr
! def Test_expr1_trinary()
var lines =<< trim END
assert_equal('one', true ? 'one' : 'two')
assert_equal('one', 1 ?
--- 12,18 ----
enddef
" test cond ? expr : expr
! def Test_expr1_ternary()
var lines =<< trim END
assert_equal('one', true ? 'one' : 'two')
assert_equal('one', 1 ?
***************
*** 74,80 ****
v9.CheckDefAndScriptFailure(lines, ['E1001: Variable not found: FuncOne',
'E121: Undefined variable: FuncTwo'])
enddef
! def Test_expr1_trinary_vimscript()
# check line continuation
var lines =<< trim END
var name = 1
--- 74,80 ----
v9.CheckDefAndScriptFailure(lines, ['E1001: Variable not found: FuncOne',
'E121: Undefined variable: FuncTwo'])
enddef
! def Test_expr1_ternary_vimscript()
# check line continuation
var lines =<< trim END
var name = 1
***************
*** 170,176 ****
v9.CheckDefAndScriptSuccess(lines)
enddef
! func Test_expr1_trinary_fails()
call v9.CheckDefAndScriptFailure(["var x = 1 ? 'one'"], "Missing ':' after
'?'", 1)
let msg = "White space required before and after '?'"
--- 170,176 ----
v9.CheckDefAndScriptSuccess(lines)
enddef
! func Test_expr1_ternary_fails()
call v9.CheckDefAndScriptFailure(["var x = 1 ? 'one'"], "Missing ':' after
'?'", 1)
let msg = "White space required before and after '?'"
*** ../vim-8.2.4475/src/testdir/test_vimscript.vim 2021-12-16
21:11:21.184286374 +0000
--- src/testdir/test_vimscript.vim 2022-02-26 11:34:43.668671667 +0000
***************
*** 7475,7481 ****
endfunc
" Test for issue6776 {{{1
! func Test_trinary_expression()
try
call eval('0 ? 0')
catch
--- 7475,7481 ----
endfunc
" Test for issue6776 {{{1
! func Test_ternary_expression()
try
call eval('0 ? 0')
catch
*** ../vim-8.2.4475/src/version.c 2022-02-26 11:04:39.094453014 +0000
--- src/version.c 2022-02-26 11:45:54.610195385 +0000
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 4476,
/**/
--
hundred-and-one symptoms of being an internet addict:
109. You actually read -- and enjoy -- lists like this.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220226114754.47D981C1149%40moolenaar.net.