annotate src/testdir/test_terminal_fail.vim @ 19726:ad37a198a708 v8.2.0419

patch 8.2.0419: various memory leaks in Vim9 script code Commit: https://github.com/vim/vim/commit/20431c9dbb592ebe0666bf042af7d2b373107372 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 20 18:39:46 2020 +0100 patch 8.2.0419: various memory leaks in Vim9 script code Problem: Various memory leaks in Vim9 script code. Solution: Fix the leaks. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/5814)
author Bram Moolenaar <Bram@vim.org>
date Fri, 20 Mar 2020 18:45:04 +0100
parents 8e9e9124c7a2
children c087099e9163
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12407
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " This test is in a separate file, because it usually causes reports for memory
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " leaks under valgrind. That is because when fork/exec fails memory is not
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " freed. Since the process exists right away it's not a real leak.
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4
17089
8e9e9124c7a2 patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents: 17049
diff changeset
5 source check.vim
8e9e9124c7a2 patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents: 17049
diff changeset
6 CheckFeature terminal
12407
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 source shared.vim
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 func Test_terminal_redir_fails()
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 if has('unix')
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 let buf = term_start('xyzabc', {'err_io': 'file', 'err_name': 'Xfile'})
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 call term_wait(buf)
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 call WaitFor('len(readfile("Xfile")) > 0')
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 call assert_match('executing job failed', readfile('Xfile')[0])
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 call WaitFor('!&modified')
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 call delete('Xfile')
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 bwipe
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 endif
e9dbdc4d8279 patch 8.0.1083: leaking memory in input part of channel
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 endfunc