mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.4476: operator name spelled wrong
Problem: Operator name spelled wrong. Solution: Change trinary to ternary. (Goc Dundar, closes #9850)
This commit is contained in:
parent
4df5b33f20
commit
e41c1dd889
@ -43,7 +43,7 @@ func Test_version()
|
|||||||
call assert_false(has('patch-9.9.1'))
|
call assert_false(has('patch-9.9.1'))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_op_trinary()
|
func Test_op_ternary()
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
call assert_equal('yes', 1 ? 'yes' : 'no')
|
call assert_equal('yes', 1 ? 'yes' : 'no')
|
||||||
call assert_equal('no', 0 ? 'yes' : 'no')
|
call assert_equal('no', 0 ? 'yes' : 'no')
|
||||||
|
@ -12,7 +12,7 @@ def FuncTwo(arg: number): number
|
|||||||
enddef
|
enddef
|
||||||
|
|
||||||
" test cond ? expr : expr
|
" test cond ? expr : expr
|
||||||
def Test_expr1_trinary()
|
def Test_expr1_ternary()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
assert_equal('one', true ? 'one' : 'two')
|
assert_equal('one', true ? 'one' : 'two')
|
||||||
assert_equal('one', 1 ?
|
assert_equal('one', 1 ?
|
||||||
@ -74,7 +74,7 @@ def Test_expr1_trinary()
|
|||||||
v9.CheckDefAndScriptFailure(lines, ['E1001: Variable not found: FuncOne', 'E121: Undefined variable: FuncTwo'])
|
v9.CheckDefAndScriptFailure(lines, ['E1001: Variable not found: FuncOne', 'E121: Undefined variable: FuncTwo'])
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_expr1_trinary_vimscript()
|
def Test_expr1_ternary_vimscript()
|
||||||
# check line continuation
|
# check line continuation
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
var name = 1
|
var name = 1
|
||||||
@ -170,7 +170,7 @@ def Test_expr1_trinary_vimscript()
|
|||||||
v9.CheckDefAndScriptSuccess(lines)
|
v9.CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
func Test_expr1_trinary_fails()
|
func Test_expr1_ternary_fails()
|
||||||
call v9.CheckDefAndScriptFailure(["var x = 1 ? 'one'"], "Missing ':' after '?'", 1)
|
call v9.CheckDefAndScriptFailure(["var x = 1 ? 'one'"], "Missing ':' after '?'", 1)
|
||||||
|
|
||||||
let msg = "White space required before and after '?'"
|
let msg = "White space required before and after '?'"
|
||||||
|
@ -7475,7 +7475,7 @@ func Test_typed_script_var()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for issue6776 {{{1
|
" Test for issue6776 {{{1
|
||||||
func Test_trinary_expression()
|
func Test_ternary_expression()
|
||||||
try
|
try
|
||||||
call eval('0 ? 0')
|
call eval('0 ? 0')
|
||||||
catch
|
catch
|
||||||
|
@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4476,
|
||||||
/**/
|
/**/
|
||||||
4475,
|
4475,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user