Mercurial > vim
comparison src/testdir/test_vim9_builtin.vim @ 25340:37001467805f v8.2.3207
patch 8.2.3207: Vim9: crash when compiling string fails
Commit: https://github.com/vim/vim/commit/5a234eb18e6e43408755bb24e813330306c11629
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 24 13:18:48 2021 +0200
patch 8.2.3207: Vim9: crash when compiling string fails
Problem: Vim9: crash when compiling string fails. (Yegappan Lakshmanan)
Solution: Adjust the type stack length.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 24 Jul 2021 13:30:04 +0200 |
parents | e2be9f3c5907 |
children | f874e7095878 |
comparison
equal
deleted
inserted
replaced
25339:5f0765ae6ad9 | 25340:37001467805f |
---|---|
2564 enddef | 2564 enddef |
2565 Fail() | 2565 Fail() |
2566 END | 2566 END |
2567 CheckScriptSuccess(lines) | 2567 CheckScriptSuccess(lines) |
2568 assert_equal('yes', g:caught) | 2568 assert_equal('yes', g:caught) |
2569 | |
2570 unlet g:caught | 2569 unlet g:caught |
2570 | |
2571 lines =<< trim END | |
2572 echo searchpair("a", "b", "c", "d", "1", "f") | |
2573 END | |
2574 CheckDefAndScriptFailure2(lines, 'E1001:', 'E475:') | |
2575 | |
2571 bwipe! | 2576 bwipe! |
2572 enddef | 2577 enddef |
2573 | 2578 |
2574 def Test_searchpos() | 2579 def Test_searchpos() |
2575 CheckDefAndScriptFailure2(['searchpos(1)'], 'E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1') | 2580 CheckDefAndScriptFailure2(['searchpos(1)'], 'E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1') |