1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0476
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 8.1.0476
Problem: Memory leaks in test_escaped_glob.
Solution: Avoid failure when running the shell, use the sandbox.
Files: src/testdir/test_escaped_glob.vim
*** ../vim-8.1.0475/src/testdir/test_escaped_glob.vim 2017-12-07 22:05:10.000000000 +0100
--- src/testdir/test_escaped_glob.vim 2018-10-14 22:02:01.544686099 +0200
***************
*** 2,9 ****
" characters.
function SetUp()
- " make sure glob() doesn't use the shell
- set shell=doesnotexist
" consistent sorting of file names
set nofileignorecase
endfunction
--- 2,7 ----
***************
*** 14,32 ****
" filenames. Disable the test on non-Unix systems for now.
return
endif
! call assert_equal("", glob('Xxx\{'))
! call assert_equal("", glob('Xxx\$'))
w! Xxx{
w! Xxx\$
! call assert_equal("Xxx{", glob('Xxx\{'))
! call assert_equal("Xxx$", glob('Xxx\$'))
call delete('Xxx{')
call delete('Xxx$')
endfunction
function Test_globpath()
! call assert_equal("sautest/autoload/globone.vim\nsautest/autoload/globtwo.vim",
\ globpath('sautest/autoload', 'glob*.vim'))
! call assert_equal(['sautest/autoload/globone.vim', 'sautest/autoload/globtwo.vim'],
\ globpath('sautest/autoload', 'glob*.vim', 0, 1))
endfunction
--- 12,33 ----
" filenames. Disable the test on non-Unix systems for now.
return
endif
!
! " Execute these commands in the sandbox, so that using the shell fails.
! " Setting 'shell' to an invalid name causes a memory leak.
! sandbox call assert_equal("", glob('Xxx\{'))
! sandbox call assert_equal("", glob('Xxx\$'))
w! Xxx{
w! Xxx\$
! sandbox call assert_equal("Xxx{", glob('Xxx\{'))
! sandbox call assert_equal("Xxx$", glob('Xxx\$'))
call delete('Xxx{')
call delete('Xxx$')
endfunction
function Test_globpath()
! sandbox call assert_equal("sautest/autoload/globone.vim\nsautest/autoload/globtwo.vim",
\ globpath('sautest/autoload', 'glob*.vim'))
! sandbox call assert_equal(['sautest/autoload/globone.vim', 'sautest/autoload/globtwo.vim'],
\ globpath('sautest/autoload', 'glob*.vim', 0, 1))
endfunction
*** ../vim-8.1.0475/src/version.c 2018-10-14 21:40:57.356848425 +0200
--- src/version.c 2018-10-14 22:03:06.948104382 +0200
***************
*** 794,795 ****
--- 794,797 ----
{ /* Add new patch number below this line */
+ /**/
+ 476,
/**/
--
panic("Foooooooood fight!");
-- In the kernel source aha1542.c, after detecting a bad segment list
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|