Mercurial > vim
annotate src/testdir/test_quotestar.vim @ 22139:c7fb7361df33 v8.2.1619
patch 8.2.1619: Vim9: cannot pass "true" to spellsuggest()
Commit: https://github.com/vim/vim/commit/7c27f337bf278babc1ccdcb66ac975f115d660b7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 5 22:45:55 2020 +0200
patch 8.2.1619: Vim9: cannot pass "true" to spellsuggest()
Problem: Vim9: cannot pass "true" to spellsuggest().
Solution: Use tv_get_bool_chk(). (closes https://github.com/vim/vim/issues/6883)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Sep 2020 23:00:03 +0200 |
parents | 08940efa6b4e |
children | dcb59b1cc0c1 |
rev | line source |
---|---|
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " *-register (quotestar) tests |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
16437
fbc0b3b38c79
patch 8.1.1223: middle mouse click test fails without a clipboard
Bram Moolenaar <Bram@vim.org>
parents:
16376
diff
changeset
|
3 source shared.vim |
17686
853afcc375b2
patch 8.1.1840: Testing: WorkingClipboard() is not accurate
Bram Moolenaar <Bram@vim.org>
parents:
17089
diff
changeset
|
4 source check.vim |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
17686
853afcc375b2
patch 8.1.1840: Testing: WorkingClipboard() is not accurate
Bram Moolenaar <Bram@vim.org>
parents:
17089
diff
changeset
|
6 CheckFeature clipboard_working |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 func Do_test_quotestar_for_macunix() |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 if empty(exepath('pbcopy')) || empty(exepath('pbpaste')) |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 return 'Test requires pbcopy(1) and pbpaste(1)' |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 endif |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 let @* = '' |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 " Test #1: Pasteboard to Vim |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 let test_msg = "text from pasteboard to vim via quotestar" |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 " Write a piece of text to the pasteboard. |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 call system('/bin/echo -n "' . test_msg . '" | pbcopy') |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 " See if the *-register is changed as expected. |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 call assert_equal(test_msg, @*) |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 " Test #2: Vim to Pasteboard |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 let test_msg = "text from vim to pasteboard via quotestar" |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 " Write a piece of text to the *-register. |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 let @* = test_msg |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 " See if the pasteboard is changed as expected. |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 call assert_equal(test_msg, system('pbpaste')) |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 return '' |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 endfunc |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 func Do_test_quotestar_for_x11() |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 if !has('clientserver') || !has('job') |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 return 'Test requires the client-server and job features' |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 endif |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 let cmd = GetVimCommand() |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 if cmd == '' |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19801
diff
changeset
|
39 throw 'GetVimCommand() failed' |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 endif |
11242
9612b93820a4
patch 8.0.0507: client-server tests fail when $DISPLAY is not set
Christian Brabandt <cb@256bit.org>
parents:
11227
diff
changeset
|
41 try |
9612b93820a4
patch 8.0.0507: client-server tests fail when $DISPLAY is not set
Christian Brabandt <cb@256bit.org>
parents:
11227
diff
changeset
|
42 call remote_send('xxx', '') |
9612b93820a4
patch 8.0.0507: client-server tests fail when $DISPLAY is not set
Christian Brabandt <cb@256bit.org>
parents:
11227
diff
changeset
|
43 catch |
9612b93820a4
patch 8.0.0507: client-server tests fail when $DISPLAY is not set
Christian Brabandt <cb@256bit.org>
parents:
11227
diff
changeset
|
44 if v:exception =~ 'E240:' |
9612b93820a4
patch 8.0.0507: client-server tests fail when $DISPLAY is not set
Christian Brabandt <cb@256bit.org>
parents:
11227
diff
changeset
|
45 " No connection to the X server, give up. |
9612b93820a4
patch 8.0.0507: client-server tests fail when $DISPLAY is not set
Christian Brabandt <cb@256bit.org>
parents:
11227
diff
changeset
|
46 return |
9612b93820a4
patch 8.0.0507: client-server tests fail when $DISPLAY is not set
Christian Brabandt <cb@256bit.org>
parents:
11227
diff
changeset
|
47 endif |
9612b93820a4
patch 8.0.0507: client-server tests fail when $DISPLAY is not set
Christian Brabandt <cb@256bit.org>
parents:
11227
diff
changeset
|
48 " ignore other errors |
9612b93820a4
patch 8.0.0507: client-server tests fail when $DISPLAY is not set
Christian Brabandt <cb@256bit.org>
parents:
11227
diff
changeset
|
49 endtry |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 let name = 'XVIMCLIPBOARD' |
11498
370e833dcd4d
patch 8.0.0632: the quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11250
diff
changeset
|
52 |
370e833dcd4d
patch 8.0.0632: the quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11250
diff
changeset
|
53 " Make sure a previous server has exited |
370e833dcd4d
patch 8.0.0632: the quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11250
diff
changeset
|
54 try |
370e833dcd4d
patch 8.0.0632: the quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11250
diff
changeset
|
55 call remote_send(name, ":qa!\<CR>") |
370e833dcd4d
patch 8.0.0632: the quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11250
diff
changeset
|
56 catch /E241:/ |
370e833dcd4d
patch 8.0.0632: the quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11250
diff
changeset
|
57 endtry |
13808
16a062cf08c2
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents:
13650
diff
changeset
|
58 call WaitForAssert({-> assert_notmatch(name, serverlist())}) |
11498
370e833dcd4d
patch 8.0.0632: the quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11250
diff
changeset
|
59 |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 let cmd .= ' --servername ' . name |
12765
c1347c968d31
patch 8.0.1260: using global variables for WaitFor()
Christian Brabandt <cb@256bit.org>
parents:
11709
diff
changeset
|
61 let job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'}) |
13808
16a062cf08c2
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents:
13650
diff
changeset
|
62 call WaitForAssert({-> assert_equal("run", job_status(job))}) |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 " Takes a short while for the server to be active. |
13808
16a062cf08c2
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents:
13650
diff
changeset
|
65 call WaitForAssert({-> assert_match(name, serverlist())}) |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 |
11227
9bfae04699c3
patch 8.0.0500: quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11217
diff
changeset
|
67 " Wait for the server to be up and answering requests. One second is not |
9bfae04699c3
patch 8.0.0500: quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11217
diff
changeset
|
68 " always sufficient. |
13808
16a062cf08c2
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents:
13650
diff
changeset
|
69 call WaitForAssert({-> assert_notequal('', remote_expr(name, "v:version", "", 2))}) |
11227
9bfae04699c3
patch 8.0.0500: quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11217
diff
changeset
|
70 |
13324
283d0ee46f00
patch 8.0.1536: quotestar test is flaky when using the GUI
Christian Brabandt <cb@256bit.org>
parents:
12765
diff
changeset
|
71 " Clear the *-register of this vim instance and wait for it to be picked up |
283d0ee46f00
patch 8.0.1536: quotestar test is flaky when using the GUI
Christian Brabandt <cb@256bit.org>
parents:
12765
diff
changeset
|
72 " by the server. |
283d0ee46f00
patch 8.0.1536: quotestar test is flaky when using the GUI
Christian Brabandt <cb@256bit.org>
parents:
12765
diff
changeset
|
73 let @* = 'no' |
283d0ee46f00
patch 8.0.1536: quotestar test is flaky when using the GUI
Christian Brabandt <cb@256bit.org>
parents:
12765
diff
changeset
|
74 call remote_foreground(name) |
13808
16a062cf08c2
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents:
13650
diff
changeset
|
75 call WaitForAssert({-> assert_equal("no", remote_expr(name, "@*", "", 1))}) |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 |
13324
283d0ee46f00
patch 8.0.1536: quotestar test is flaky when using the GUI
Christian Brabandt <cb@256bit.org>
parents:
12765
diff
changeset
|
77 " Set the * register on the server. |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 call remote_send(name, ":let @* = 'yes'\<CR>") |
13808
16a062cf08c2
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents:
13650
diff
changeset
|
79 call WaitForAssert({-> assert_equal("yes", remote_expr(name, "@*", "", 1))}) |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 " Check that the *-register of this vim instance is changed as expected. |
13808
16a062cf08c2
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents:
13650
diff
changeset
|
82 call WaitForAssert({-> assert_equal("yes", @*)}) |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 |
11709
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
84 " Handle the large selection over 262040 byte. |
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
85 let length = 262044 |
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
86 let sample = 'a' . repeat('b', length - 2) . 'c' |
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
87 let @* = sample |
13650
87ffb7f85b28
patch 8.0.1697: various tests are still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
13324
diff
changeset
|
88 call WaitFor('remote_expr("' . name . '", "len(@*) >= ' . length . '", "", 1)') |
11709
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
89 let res = remote_expr(name, "@*", "", 2) |
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
90 call assert_equal(length, len(res)) |
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
91 " Check length to prevent a large amount of output at assertion failure. |
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
92 if length == len(res) |
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
93 call assert_equal(sample, res) |
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
94 endif |
c3227699ad4d
patch 8.0.0737: crash when X11 selection is very big
Christian Brabandt <cb@256bit.org>
parents:
11498
diff
changeset
|
95 |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 if has('unix') && has('gui') && !has('gui_running') |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 let @* = '' |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
98 |
16376
3b5d401a58ce
patch 8.1.1193: typos and small problems in test files
Bram Moolenaar <Bram@vim.org>
parents:
13808
diff
changeset
|
99 " Running in a terminal and the GUI is available: Tell the server to open |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
100 " the GUI and check that the remote command still works. |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
101 " Need to wait for the GUI to start up, otherwise the send hangs in trying |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
102 " to send to the terminal window. |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 if has('gui_athena') || has('gui_motif') |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 " For those GUIs, ignore the 'failed to create input context' error. |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
105 call remote_send(name, ":call test_ignore_error('E285') | gui -f\<CR>") |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
106 else |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
107 call remote_send(name, ":gui -f\<CR>") |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
108 endif |
11227
9bfae04699c3
patch 8.0.0500: quotestar test is still a bit flaky
Christian Brabandt <cb@256bit.org>
parents:
11217
diff
changeset
|
109 " Wait for the server in the GUI to be up and answering requests. |
19801
92c6105e9c8e
patch 8.2.0457: Test_quotestar() often fails when run under valgrind
Bram Moolenaar <Bram@vim.org>
parents:
17686
diff
changeset
|
110 " On some systems and with valgrind this can be very slow. |
92c6105e9c8e
patch 8.2.0457: Test_quotestar() often fails when run under valgrind
Bram Moolenaar <Bram@vim.org>
parents:
17686
diff
changeset
|
111 call WaitForAssert({-> assert_match("1", remote_expr(name, "has('gui_running')", "", 1))}, 10000) |
11217
466657ab7340
patch 8.0.0495: quotestar test uses timer instead of timeout
Christian Brabandt <cb@256bit.org>
parents:
11209
diff
changeset
|
112 |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 call remote_send(name, ":let @* = 'maybe'\<CR>") |
13808
16a062cf08c2
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents:
13650
diff
changeset
|
114 call WaitForAssert({-> assert_equal("maybe", remote_expr(name, "@*", "", 2))}) |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 call assert_equal('maybe', @*) |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
117 endif |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
118 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
119 call remote_send(name, ":qa!\<CR>") |
12765
c1347c968d31
patch 8.0.1260: using global variables for WaitFor()
Christian Brabandt <cb@256bit.org>
parents:
11709
diff
changeset
|
120 try |
13808
16a062cf08c2
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents:
13650
diff
changeset
|
121 call WaitForAssert({-> assert_equal("dead", job_status(job))}) |
12765
c1347c968d31
patch 8.0.1260: using global variables for WaitFor()
Christian Brabandt <cb@256bit.org>
parents:
11709
diff
changeset
|
122 finally |
c1347c968d31
patch 8.0.1260: using global variables for WaitFor()
Christian Brabandt <cb@256bit.org>
parents:
11709
diff
changeset
|
123 if job_status(job) != 'dead' |
c1347c968d31
patch 8.0.1260: using global variables for WaitFor()
Christian Brabandt <cb@256bit.org>
parents:
11709
diff
changeset
|
124 call assert_report('Server did not exit') |
c1347c968d31
patch 8.0.1260: using global variables for WaitFor()
Christian Brabandt <cb@256bit.org>
parents:
11709
diff
changeset
|
125 call job_stop(job, 'kill') |
c1347c968d31
patch 8.0.1260: using global variables for WaitFor()
Christian Brabandt <cb@256bit.org>
parents:
11709
diff
changeset
|
126 endif |
c1347c968d31
patch 8.0.1260: using global variables for WaitFor()
Christian Brabandt <cb@256bit.org>
parents:
11709
diff
changeset
|
127 endtry |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
128 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
129 return '' |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
130 endfunc |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
131 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
132 func Test_quotestar() |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
133 let skipped = '' |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
134 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
135 let quotestar_saved = @* |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
136 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
137 if has('macunix') |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
138 let skipped = Do_test_quotestar_for_macunix() |
11250
ca5550f66b27
patch 8.0.0511: message for skipping client-server tests is unclear
Christian Brabandt <cb@256bit.org>
parents:
11242
diff
changeset
|
139 elseif has('x11') |
ca5550f66b27
patch 8.0.0511: message for skipping client-server tests is unclear
Christian Brabandt <cb@256bit.org>
parents:
11242
diff
changeset
|
140 if empty($DISPLAY) |
ca5550f66b27
patch 8.0.0511: message for skipping client-server tests is unclear
Christian Brabandt <cb@256bit.org>
parents:
11242
diff
changeset
|
141 let skipped = "Test can only run when $DISPLAY is set." |
ca5550f66b27
patch 8.0.0511: message for skipping client-server tests is unclear
Christian Brabandt <cb@256bit.org>
parents:
11242
diff
changeset
|
142 else |
ca5550f66b27
patch 8.0.0511: message for skipping client-server tests is unclear
Christian Brabandt <cb@256bit.org>
parents:
11242
diff
changeset
|
143 let skipped = Do_test_quotestar_for_x11() |
ca5550f66b27
patch 8.0.0511: message for skipping client-server tests is unclear
Christian Brabandt <cb@256bit.org>
parents:
11242
diff
changeset
|
144 endif |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
145 else |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
146 let skipped = "Test is not implemented yet for this platform." |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
147 endif |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
148 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
149 let @* = quotestar_saved |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
150 |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
151 if !empty(skipped) |
11209
1083038c59ba
patch 8.0.0491: quotestar test fails when features are missing
Christian Brabandt <cb@256bit.org>
parents:
11205
diff
changeset
|
152 throw 'Skipped: ' . skipped |
11205
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
153 endif |
4db196820d3b
patch 8.0.0489: clipboard and "* register is not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
154 endfunc |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19801
diff
changeset
|
155 |
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19801
diff
changeset
|
156 " vim: shiftwidth=2 sts=2 expandtab |