Mercurial > vim
changeset 27901:dd7d94b911fa v8.2.4476
patch 8.2.4476: operator name spelled wrong
Commit: https://github.com/vim/vim/commit/e41c1dd8890d3f701253255993f4e9af2d12225c
Author: =?UTF-8?q?Dundar=20G=C3=B6c?= <gocdundar@gmail.com>
Date: Sat Feb 26 11:46:13 2022 +0000
patch 8.2.4476: operator name spelled wrong
Problem: Operator name spelled wrong.
Solution: Change trinary to ternary. (Goc Dundar, closes https://github.com/vim/vim/issues/9850)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Feb 2022 13:00:04 +0100 |
parents | b39a350da22f |
children | 8481c8908b5e |
files | src/testdir/test_expr.vim src/testdir/test_vim9_expr.vim src/testdir/test_vimscript.vim src/version.c |
diffstat | 4 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -43,7 +43,7 @@ func Test_version() call assert_false(has('patch-9.9.1')) endfunc -func Test_op_trinary() +func Test_op_ternary() let lines =<< trim END call assert_equal('yes', 1 ? 'yes' : 'no') call assert_equal('no', 0 ? 'yes' : 'no')
--- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -12,7 +12,7 @@ def FuncTwo(arg: number): number enddef " test cond ? expr : expr -def Test_expr1_trinary() +def Test_expr1_ternary() var lines =<< trim END assert_equal('one', true ? 'one' : 'two') assert_equal('one', 1 ? @@ -74,7 +74,7 @@ def Test_expr1_trinary() v9.CheckDefAndScriptFailure(lines, ['E1001: Variable not found: FuncOne', 'E121: Undefined variable: FuncTwo']) enddef -def Test_expr1_trinary_vimscript() +def Test_expr1_ternary_vimscript() # check line continuation var lines =<< trim END var name = 1 @@ -170,7 +170,7 @@ def Test_expr1_trinary_vimscript() v9.CheckDefAndScriptSuccess(lines) enddef -func Test_expr1_trinary_fails() +func Test_expr1_ternary_fails() call v9.CheckDefAndScriptFailure(["var x = 1 ? 'one'"], "Missing ':' after '?'", 1) let msg = "White space required before and after '?'"