Mercurial > vim
annotate src/testdir/test_exit.vim @ 29481:34bb46847ba0 v9.0.0082
patch 9.0.0082: cannot interrupt global command from command line
Commit: https://github.com/vim/vim/commit/3cfae39b087c2724991d385e5e8ee7d011aa8e99
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Jul 26 17:48:13 2022 +0100
patch 9.0.0082: cannot interrupt global command from command line
Problem: Cannot interrupt global command from command line.
Solution: Reset got_int in another place. (closes https://github.com/vim/vim/issues/10739)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 26 Jul 2022 19:00:03 +0200 |
parents | 5dd393285464 |
children | ea38db8639eb |
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') |
13442
94e638936d3e
patch 8.0.1595: no autocommand triggered before exiting
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 endfunc |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
18406
diff
changeset
|
85 |
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
|
86 " 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
|
87 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
|
88 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
|
89 |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
90 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
|
91 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
|
92 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
|
93 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
|
94 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
|
95 [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
|
96 |
ad674a98058a
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
97 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
|
98 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
|
99 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
|
100 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
|
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 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
|
103 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
|
104 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
|
105 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
|
106 |
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 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
|
108 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
|
109 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
|
110 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
|
111 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
|
112 |
27825
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
113 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
|
114 CheckNotGui |
27839
cd4187269bdf
patch 8.2.4445: exit test fails on MS-Windows anyway
Bram Moolenaar <Bram@vim.org>
parents:
27837
diff
changeset
|
115 CheckNotMSWindows |
27837
264cb6d2d0e9
patch 8.2.4444: beep caused by test
Bram Moolenaar <Bram@vim.org>
parents:
27833
diff
changeset
|
116 " 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
|
117 CheckNotAsan |
29253
5dd393285464
patch 8.2.5145: exit test causes spurious valgrind reports
Bram Moolenaar <Bram@vim.org>
parents:
27857
diff
changeset
|
118 CheckNotValgrind |
27825
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
119 |
27837
264cb6d2d0e9
patch 8.2.4444: beep caused by test
Bram Moolenaar <Bram@vim.org>
parents:
27833
diff
changeset
|
120 call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew", "q:"], 'Xscript', 'b') |
27825
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
121 |
27837
264cb6d2d0e9
patch 8.2.4444: beep caused by test
Bram Moolenaar <Bram@vim.org>
parents:
27833
diff
changeset
|
122 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
|
123 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
|
124 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
|
125 endif |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
126 call delete('Xscript') |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
127 call delete('Xtestout') |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
128 endfun |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
129 |
041de9fe95db
patch 8.2.4438: crash on exit when using cmdline window
Bram Moolenaar <Bram@vim.org>
parents:
23048
diff
changeset
|
130 |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
18406
diff
changeset
|
131 " vim: shiftwidth=2 sts=2 expandtab |