Mercurial > vim
comparison src/testdir/test_functions.vim @ 17944:745c02392844 v8.1.1968
patch 8.1.1968: crash when using nested map()
Commit: https://github.com/vim/vim/commit/27da7de7c547dbf983ed7dd901ea59be4e7c9ab2
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 3 17:13:37 2019 +0200
patch 8.1.1968: crash when using nested map()
Problem: Crash when using nested map().
Solution: Clear the pointer in prepare_vimvar(). (Ozaki Kiichi,
closes #4890, closes #4891)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 03 Sep 2019 17:15:03 +0200 |
parents | 0cdb6ac20748 |
children | 4754339d9aee |
comparison
equal
deleted
inserted
replaced
17943:7c6b79acf9b9 | 17944:745c02392844 |
---|---|
1541 " Limit to 1 result. | 1541 " Limit to 1 result. |
1542 let l = [] | 1542 let l = [] |
1543 let files = readdir('Xdir', {x -> len(add(l, x)) == 2 ? -1 : 1}) | 1543 let files = readdir('Xdir', {x -> len(add(l, x)) == 2 ? -1 : 1}) |
1544 call assert_equal(1, len(files)) | 1544 call assert_equal(1, len(files)) |
1545 | 1545 |
1546 " Nested readdir() must not crash | |
1547 let files = readdir('Xdir', 'readdir("Xdir", "1") != []') | |
1548 call sort(files)->assert_equal(['bar.txt', 'dir', 'foo.txt']) | |
1549 | |
1546 eval 'Xdir'->delete('rf') | 1550 eval 'Xdir'->delete('rf') |
1547 endfunc | 1551 endfunc |
1548 | 1552 |
1549 func Test_delete_rf() | 1553 func Test_delete_rf() |
1550 call mkdir('Xdir') | 1554 call mkdir('Xdir') |