diff options
-rw-r--r-- | src/nvim/eval.c | 3 | ||||
-rw-r--r-- | test/old/testdir/test_blob.vim | 14 | ||||
-rw-r--r-- | test/old/testdir/test_expr.vim | 1 | ||||
-rw-r--r-- | test/old/testdir/test_filter_map.vim | 2 | ||||
-rw-r--r-- | test/old/testdir/test_listdict.vim | 1 |
5 files changed, 18 insertions, 3 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 50f5fa578c..dab0896d75 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -5217,9 +5217,6 @@ static void filter_map(typval_T *argvars, typval_T *rettv, filtermap_T filtermap typval_T newtv; if (filter_map_one(&tv, expr, filtermap, &newtv, &rem) == FAIL || did_emsg) { - break; - } - if (did_emsg) { tv_clear(&newtv); tv_clear(&tv); break; diff --git a/test/old/testdir/test_blob.vim b/test/old/testdir/test_blob.vim index 920ceb826d..2dae19bcfb 100644 --- a/test/old/testdir/test_blob.vim +++ b/test/old/testdir/test_blob.vim @@ -38,6 +38,7 @@ func Test_blob_create() call assert_fails('VAR b = 0z001122.') call assert_fails('call get("", 1)', 'E896:') call assert_equal(0, len(v:_null_blob)) + call assert_equal(0z, copy(v:_null_blob)) END call CheckLegacyAndVim9Success(lines) endfunc @@ -370,6 +371,14 @@ func Test_blob_add() add(v:_null_blob, 0x22) END call CheckDefExecAndScriptFailure(lines, 'E1131:') + + let lines =<< trim END + let b = 0zDEADBEEF + lockvar b + call add(b, 0) + unlockvar b + END + call CheckScriptFailure(lines, 'E741:') endfunc func Test_blob_empty() @@ -464,6 +473,9 @@ func Test_blob_func_remove() remove(b, 0) END call CheckScriptFailure(lines, 'E741:') + + call assert_fails('echo remove(0z1020, [])', 'E745:') + call assert_fails('echo remove(0z1020, 0, [])', 'E745:') endfunc func Test_blob_read_write() @@ -524,6 +536,7 @@ func Test_blob_filter() call assert_equal(0zADEF, filter(0zDEADBEEF, 'v:key % 2')) END call CheckLegacyAndVim9Success(lines) + call assert_fails('echo filter(0z10, "a10")', 'E121:') endfunc " map() item in blob @@ -539,6 +552,7 @@ func Test_blob_map() call map(0z00, '[9]') END call CheckLegacyAndVim9Failure(lines, 'E978:') + call assert_fails('echo map(0z10, "a10")', 'E121:') endfunc func Test_blob_index() diff --git a/test/old/testdir/test_expr.vim b/test/old/testdir/test_expr.vim index bf1ba240eb..d316e63818 100644 --- a/test/old/testdir/test_expr.vim +++ b/test/old/testdir/test_expr.vim @@ -421,6 +421,7 @@ func Test_printf_misc() call assert_equal('[00000あiう]', printf('[%010.7S]', 'あiう')) call assert_equal('1%', printf('%d%%', 1)) + call assert_notequal('', printf('%p', "abc")) END call CheckLegacyAndVim9Success(lines) diff --git a/test/old/testdir/test_filter_map.vim b/test/old/testdir/test_filter_map.vim index e67243b072..9b1dc93fd4 100644 --- a/test/old/testdir/test_filter_map.vim +++ b/test/old/testdir/test_filter_map.vim @@ -175,6 +175,8 @@ func Test_filter_map_string() call assert_equal('', map('abc', LSTART i, x LMIDDLE '' LEND)) call assert_equal('', map('', "v:val == 'a'")) call assert_equal('', map(v:_null_string, "v:val == 'a'")) + call assert_fails('echo map("abc", "10")', 'E928:') + call assert_fails('echo map("abc", "a10")', 'E121:') END call CheckLegacyAndVim9Success(lines) diff --git a/test/old/testdir/test_listdict.vim b/test/old/testdir/test_listdict.vim index dc155ce0fc..d6309bad1e 100644 --- a/test/old/testdir/test_listdict.vim +++ b/test/old/testdir/test_listdict.vim @@ -1079,6 +1079,7 @@ func Test_listdict_extend() let d = {'a': 'A', 'b': 'B'} call assert_fails("call extend(d, {'b': 0, 'c':'C'}, 'error')", 'E737:') + call assert_fails("call extend(d, {'b': 0}, [])", 'E730:') call assert_fails("call extend(d, {'b': 0, 'c':'C'}, 'xxx')", 'E475:') if has('float') call assert_fails("call extend(d, {'b': 0, 'c':'C'}, 1.2)", 'E475:') |