Mercurial > vim
annotate src/testdir/test_exit.vim @ 32627:eeed0045eff4 v9.0.1645
patch 9.0.1645: zserio files are not recognized
Commit: https://github.com/vim/vim/commit/2b994da57a0ac6ec0ec09fe3783f48ecd2bce610
Author: =?UTF-8?q?Dominique=20Pell=C3=A9?= <dominique.pelle@gmail.com>
Date: Thu Jun 22 14:36:39 2023 +0100
patch 9.0.1645: zserio files are not recognized
Problem: zserio files are not recognized.
Solution: Add a pattern for zserio files. (Dominique Pell?,
closes #12544)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 22 Jun 2023 15:45:04 +0200 |
parents | edef053f7090 |
children | 448aef880252 |
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 |
27825
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
4 source check.vim |
13442
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 func Test_exiting() |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
7 let after =<< trim [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
8 au QuitPre * call writefile(["QuitPre"], "Xtestout") |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
9 au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
10 quit |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
11 [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
12 |
13442
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 if RunVim([], after, '') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 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
|
15 endif |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 call delete('Xtestout') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
18 let after =<< trim [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
19 au QuitPre * call writefile(["QuitPre"], "Xtestout") |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
20 au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
21 help |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
22 wincmd w |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
23 quit |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
24 [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
25 |
13442
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 if RunVim([], after, '') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 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
|
28 endif |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 call delete('Xtestout') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
31 let after =<< trim [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
32 au QuitPre * call writefile(["QuitPre"], "Xtestout") |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
33 au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
34 split |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
35 new |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
36 qall |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
37 [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
38 |
13442
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 if RunVim([], after, '') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 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
|
41 endif |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 call delete('Xtestout') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 |
18406
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
44 " ExitPre autocommand splits the window, so that it's no longer the last one. |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
45 let after =<< trim [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
46 au QuitPre * call writefile(["QuitPre"], "Xtestout", "a") |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
47 au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
48 augroup nasty |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
49 au ExitPre * split |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
50 augroup END |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
51 quit |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
52 augroup nasty |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
53 au! ExitPre |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
54 augroup END |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
55 quit |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
56 [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
13442
diff
changeset
|
57 |
13442
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 if RunVim([], after, '') |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 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
|
60 \ readfile('Xtestout')) |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 endif |
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 call delete('Xtestout') |
18406
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
63 |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
64 " ExitPre autocommand splits and closes the window, so that there is still |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
65 " one window but it's a different one. |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
66 let after =<< trim [CODE] |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
67 au QuitPre * call writefile(["QuitPre"], "Xtestout", "a") |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
68 au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
69 augroup nasty |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
70 au ExitPre * split | only |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
71 augroup END |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
72 quit |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
73 augroup nasty |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
74 au! ExitPre |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
75 augroup END |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
76 quit |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
77 [CODE] |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
78 |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
79 if RunVim([], after, '') |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
80 call assert_equal(['QuitPre', 'ExitPre', 'QuitPre', 'ExitPre'], |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
81 \ readfile('Xtestout')) |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
82 endif |
fa6efc49d71f
patch 8.1.2197: ExitPre autocommand may cause accessing freed memory
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
83 call delete('Xtestout') |
32413
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
84 |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
85 " ExitPre autocommand also executed on :wqall |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
86 let after =<< trim [CODE] |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
87 au QuitPre * call writefile(["QuitPre"], "Xtestout", "a") |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
88 au ExitPre * call writefile(["ExitPre"], "Xtestout", "a") |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
89 wqall |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
90 [CODE] |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
91 |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
92 if RunVim([], after, '') |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
93 call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
94 endif |
edef053f7090
patch 9.0.1538: :wqall does not trigger ExitPre
Bram Moolenaar <Bram@vim.org>
parents:
30405
diff
changeset
|
95 call delete('Xtestout') |
13442
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 endfunc |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
18406
diff
changeset
|
97 |
23048
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
98 " Test for getting the Vim exit code from v:exiting |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
99 func Test_exit_code() |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
100 call assert_equal(v:null, v:exiting) |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
101 |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
102 let before =<< trim [CODE] |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
103 au QuitPre * call writefile(['qp = ' .. v:exiting], 'Xtestout', 'a') |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
104 au ExitPre * call writefile(['ep = ' .. v:exiting], 'Xtestout', 'a') |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
105 au VimLeavePre * call writefile(['lp = ' .. v:exiting], 'Xtestout', 'a') |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
106 au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout', 'a') |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
107 [CODE] |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
108 |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
109 if RunVim(before, ['quit'], '') |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
110 call assert_equal(['qp = v:null', 'ep = v:null', 'lp = 0', 'l = 0'], readfile('Xtestout')) |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
111 endif |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
112 call delete('Xtestout') |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
113 |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
114 if RunVim(before, ['cquit'], '') |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
115 call assert_equal(['lp = 1', 'l = 1'], readfile('Xtestout')) |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
116 endif |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
117 call delete('Xtestout') |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
118 |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
119 if RunVim(before, ['cquit 4'], '') |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
120 call assert_equal(['lp = 4', 'l = 4'], readfile('Xtestout')) |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
121 endif |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
122 call delete('Xtestout') |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
123 endfunc |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
124 |
27825
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
125 func Test_exit_error_reading_input() |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
126 CheckNotGui |
27839
cd4187269bdf
patch 8.2.4445: exit test fails on MS-Windows anyway
Bram Moolenaar <Bram@vim.org>
parents:
27837
diff
changeset
|
127 CheckNotMSWindows |
27837
264cb6d2d0e9
patch 8.2.4444: beep caused by test
Bram Moolenaar <Bram@vim.org>
parents:
27833
diff
changeset
|
128 " The early exit causes memory not to be freed somehow |
264cb6d2d0e9
patch 8.2.4444: beep caused by test
Bram Moolenaar <Bram@vim.org>
parents:
27833
diff
changeset
|
129 CheckNotAsan |
29253
5dd393285464
patch 8.2.5145: exit test causes spurious valgrind reports
Bram Moolenaar <Bram@vim.org>
parents:
27857
diff
changeset
|
130 CheckNotValgrind |
27825
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
131 |
30405
ea38db8639eb
patch 9.0.0538: manually deleting test temp files
Bram Moolenaar <Bram@vim.org>
parents:
29253
diff
changeset
|
132 call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew", "q:"], 'Xscript', 'bD') |
27825
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
133 |
27837
264cb6d2d0e9
patch 8.2.4444: beep caused by test
Bram Moolenaar <Bram@vim.org>
parents:
27833
diff
changeset
|
134 if RunVim([], [], '<Xscript') |
27857
8c8fabf093bb
patch 8.2.4454: resetting cmdwin_type only for one situation
Bram Moolenaar <Bram@vim.org>
parents:
27839
diff
changeset
|
135 call assert_equal(1, v:shell_error) |
27825
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
136 call assert_equal(['l = 1'], readfile('Xtestout')) |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
137 endif |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
138 call delete('Xtestout') |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
139 endfun |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
140 |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
141 |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
18406
diff
changeset
|
142 " vim: shiftwidth=2 sts=2 expandtab |