summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/testdir/test_vim9_func.vim10
-rw-r--r--src/testdir/test_vim9_script.vim81
-rw-r--r--src/version.c2
3 files changed, 47 insertions, 46 deletions
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
index 7a1385c74..de107249e 100644
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -279,7 +279,7 @@ def Test_call_wrong_args()
enddef
Func([])
END
- call CheckScriptFailure(lines, 'E1013: argument 1: type mismatch, expected string but got list<unknown>', 5)
+ CheckScriptFailure(lines, 'E1013: argument 1: type mismatch, expected string but got list<unknown>', 5)
enddef
" Default arg and varargs
@@ -1099,7 +1099,7 @@ def Test_error_reporting()
enddef
defcompile
END
- call writefile(lines, 'Xdef')
+ writefile(lines, 'Xdef')
try
source Xdef
assert_report('should have failed')
@@ -1119,7 +1119,7 @@ def Test_error_reporting()
enddef
defcompile
END
- call writefile(lines, 'Xdef')
+ writefile(lines, 'Xdef')
try
source Xdef
assert_report('should have failed')
@@ -1138,7 +1138,7 @@ def Test_error_reporting()
defcompile
Func()
END
- call writefile(lines, 'Xdef')
+ writefile(lines, 'Xdef')
try
source Xdef
assert_report('should have failed')
@@ -1146,7 +1146,7 @@ def Test_error_reporting()
v:throwpoint->assert_match('_Func, line 3$')
endtry
- call delete('Xdef')
+ delete('Xdef')
enddef
def Test_deleted_function()
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index 27dbd30d2..c0ecad803 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -319,7 +319,6 @@ def Test_assignment_list()
list3 += ['end']
assert_equal(['sdf', 'asdf', 'end'], list3)
-
CheckDefExecFailure(['let ll = [1, 2, 3]', 'll[-4] = 6'], 'E684:')
CheckDefExecFailure(['let [v1, v2] = [1, 2]'], 'E1092:')
@@ -367,7 +366,7 @@ def Test_assignment_dict()
enddef
assert_equal(#{a: 43}, FillDict())
END
- call CheckScriptSuccess(lines)
+ CheckScriptSuccess(lines)
lines =<< trim END
vim9script
@@ -378,7 +377,7 @@ def Test_assignment_dict()
enddef
FillDict()
END
- call CheckScriptFailure(lines, 'E1103:')
+ CheckScriptFailure(lines, 'E1103:')
# assignment to global dict
lines =<< trim END
@@ -390,7 +389,7 @@ def Test_assignment_dict()
enddef
assert_equal(#{a: 43}, FillDict())
END
- call CheckScriptSuccess(lines)
+ CheckScriptSuccess(lines)
# assignment to buffer dict
lines =<< trim END
@@ -402,7 +401,7 @@ def Test_assignment_dict()
enddef
assert_equal(#{a: 43}, FillDict())
END
- call CheckScriptSuccess(lines)
+ CheckScriptSuccess(lines)
enddef
def Test_assignment_local()
@@ -440,7 +439,7 @@ def Test_assignment_local()
enddef
call Test_assignment_local_internal()
END
- call CheckScriptSuccess(script_lines)
+ CheckScriptSuccess(script_lines)
enddef
def Test_assignment_default()
@@ -794,37 +793,37 @@ def Test_delfunction()
CheckScriptSuccess(lines)
enddef
-func Test_wrong_type()
- call CheckDefFailure(['let var: list<nothing>'], 'E1010:')
- call CheckDefFailure(['let var: list<list<nothing>>'], 'E1010:')
- call CheckDefFailure(['let var: dict<nothing>'], 'E1010:')
- call CheckDefFailure(['let var: dict<dict<nothing>>'], 'E1010:')
-
- call CheckDefFailure(['let var: dict<number'], 'E1009:')
- call CheckDefFailure(['let var: dict<list<number>'], 'E1009:')
-
- call CheckDefFailure(['let var: ally'], 'E1010:')
- call CheckDefFailure(['let var: bram'], 'E1010:')
- call CheckDefFailure(['let var: cathy'], 'E1010:')
- call CheckDefFailure(['let var: dom'], 'E1010:')
- call CheckDefFailure(['let var: freddy'], 'E1010:')
- call CheckDefFailure(['let var: john'], 'E1010:')
- call CheckDefFailure(['let var: larry'], 'E1010:')
- call CheckDefFailure(['let var: ned'], 'E1010:')
- call CheckDefFailure(['let var: pam'], 'E1010:')
- call CheckDefFailure(['let var: sam'], 'E1010:')
- call CheckDefFailure(['let var: vim'], 'E1010:')
-
- call CheckDefFailure(['let Ref: number', 'Ref()'], 'E1085:')
- call CheckDefFailure(['let Ref: string', 'let res = Ref()'], 'E1085:')
-endfunc
+def Test_wrong_type()
+ CheckDefFailure(['let var: list<nothing>'], 'E1010:')
+ CheckDefFailure(['let var: list<list<nothing>>'], 'E1010:')
+ CheckDefFailure(['let var: dict<nothing>'], 'E1010:')
+ CheckDefFailure(['let var: dict<dict<nothing>>'], 'E1010:')
-func Test_const()
- call CheckDefFailure(['const var = 234', 'var = 99'], 'E1018:')
- call CheckDefFailure(['const one = 234', 'let one = 99'], 'E1017:')
- call CheckDefFailure(['const two'], 'E1021:')
- call CheckDefFailure(['const &option'], 'E996:')
-endfunc
+ CheckDefFailure(['let var: dict<number'], 'E1009:')
+ CheckDefFailure(['let var: dict<list<number>'], 'E1009:')
+
+ CheckDefFailure(['let var: ally'], 'E1010:')
+ CheckDefFailure(['let var: bram'], 'E1010:')
+ CheckDefFailure(['let var: cathy'], 'E1010:')
+ CheckDefFailure(['let var: dom'], 'E1010:')
+ CheckDefFailure(['let var: freddy'], 'E1010:')
+ CheckDefFailure(['let var: john'], 'E1010:')
+ CheckDefFailure(['let var: larry'], 'E1010:')
+ CheckDefFailure(['let var: ned'], 'E1010:')
+ CheckDefFailure(['let var: pam'], 'E1010:')
+ CheckDefFailure(['let var: sam'], 'E1010:')
+ CheckDefFailure(['let var: vim'], 'E1010:')
+
+ CheckDefFailure(['let Ref: number', 'Ref()'], 'E1085:')
+ CheckDefFailure(['let Ref: string', 'let res = Ref()'], 'E1085:')
+enddef
+
+def Test_const()
+ CheckDefFailure(['const var = 234', 'var = 99'], 'E1018:')
+ CheckDefFailure(['const one = 234', 'let one = 99'], 'E1017:')
+ CheckDefFailure(['const two'], 'E1021:')
+ CheckDefFailure(['const &option'], 'E996:')
+enddef
def Test_range_no_colon()
CheckDefFailure(['%s/a/b/'], 'E1050:')
@@ -844,11 +843,11 @@ def Test_block()
assert_equal(1, outer)
enddef
-func Test_block_failure()
- call CheckDefFailure(['{', 'let inner = 1', '}', 'echo inner'], 'E1001:')
- call CheckDefFailure(['}'], 'E1025:')
- call CheckDefFailure(['{', 'echo 1'], 'E1026:')
-endfunc
+def Test_block_failure()
+ CheckDefFailure(['{', 'let inner = 1', '}', 'echo inner'], 'E1001:')
+ CheckDefFailure(['}'], 'E1025:')
+ CheckDefFailure(['{', 'echo 1'], 'E1026:')
+enddef
func g:NoSuchFunc()
echo 'none'
diff --git a/src/version.c b/src/version.c
index 89ef82a34..f8d72126a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1681,
+/**/
1680,
/**/
1679,