Mercurial > vim
annotate src/testdir/test_exit.vim @ 16107:b951bea7d11e v8.1.1058
patch 8.1.1058: memory usage test may still fail on some systems
commit https://github.com/vim/vim/commit/3a731ee0c2dd34792c1b21fc4c699a84129f1b86
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 27 21:41:36 2019 +0100
patch 8.1.1058: memory usage test may still fail on some systems
Problem: Memory usage test may still fail on some systems.
Solution: Use 98% of the lower limit. (Christian Brabandt)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 27 Mar 2019 21:45:05 +0100 |
parents | 94e638936d3e |
children | 9c90cf08cfa8 |
rev | line source |
---|---|
13442
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for exiting Vim. |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 source shared.vim |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 func Test_exiting() |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 let after = [ |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout")', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 \ 'quit', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 \ ] |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 if RunVim([], after, '') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 endif |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 call delete('Xtestout') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 let after = [ |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout")', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 \ 'help', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 \ 'wincmd w', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 \ 'quit', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 \ ] |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 if RunVim([], after, '') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 endif |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 call delete('Xtestout') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 let after = [ |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout")', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 \ 'split', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 \ 'new', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 \ 'qall', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 \ ] |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 if RunVim([], after, '') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 endif |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 call delete('Xtestout') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 let after = [ |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout", "a")', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 \ 'augroup nasty', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 \ ' au ExitPre * split', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 \ 'augroup END', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 \ 'quit', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 \ 'augroup nasty', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 \ ' au! ExitPre', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 \ 'augroup END', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 \ 'quit', |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 \ ] |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 if RunVim([], after, '') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 call assert_equal(['QuitPre', 'ExitPre', 'QuitPre', 'ExitPre'], |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 \ readfile('Xtestout')) |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 endif |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 call delete('Xtestout') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 endfunc |