Mercurial > vim
comparison src/testdir/test_quotestar.vim @ 13324:283d0ee46f00 v8.0.1536
patch 8.0.1536: quotestar test is flaky when using the GUI
commit https://github.com/vim/vim/commit/791010e648a68490440e202222938c8a93b9d0d3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 24 17:42:28 2018 +0100
patch 8.0.1536: quotestar test is flaky when using the GUI
Problem: Quotestar test is flaky when using the GUI.
Solution: Add check that the star register arrived at the server. Increase
timeouts.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 24 Feb 2018 17:45:04 +0100 |
parents | c1347c968d31 |
children | 87ffb7f85b28 |
comparison
equal
deleted
inserted
replaced
13323:2a19cbcd7214 | 13324:283d0ee46f00 |
---|---|
63 let job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'}) | 63 let job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'}) |
64 call WaitFor({-> job_status(job) == "run"}) | 64 call WaitFor({-> job_status(job) == "run"}) |
65 | 65 |
66 " Takes a short while for the server to be active. | 66 " Takes a short while for the server to be active. |
67 call WaitFor('serverlist() =~ "' . name . '"') | 67 call WaitFor('serverlist() =~ "' . name . '"') |
68 call assert_match(name, serverlist()) | |
69 | 68 |
70 " Wait for the server to be up and answering requests. One second is not | 69 " Wait for the server to be up and answering requests. One second is not |
71 " always sufficient. | 70 " always sufficient. |
72 call WaitFor('remote_expr("' . name . '", "v:version", "", 2) != ""') | 71 call WaitFor('remote_expr("' . name . '", "v:version", "", 2) != ""') |
73 | 72 |
74 " Clear the *-register of this vim instance. | 73 " Clear the *-register of this vim instance and wait for it to be picked up |
75 let @* = '' | 74 " by the server. |
75 let @* = 'no' | |
76 call remote_foreground(name) | |
77 call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "no"', 3000) | |
76 | 78 |
77 " Try to change the *-register of the server. | 79 " Set the * register on the server. |
78 call remote_foreground(name) | |
79 call remote_send(name, ":let @* = 'yes'\<CR>") | 80 call remote_send(name, ":let @* = 'yes'\<CR>") |
80 call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"') | 81 call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"', 3000) |
81 call assert_equal('yes', remote_expr(name, "@*", "", 2)) | |
82 | 82 |
83 " Check that the *-register of this vim instance is changed as expected. | 83 " Check that the *-register of this vim instance is changed as expected. |
84 call WaitFor('@* == "yes"') | 84 call WaitFor('@* == "yes"', 3000) |
85 call assert_equal('yes', @*) | |
86 | 85 |
87 " Handle the large selection over 262040 byte. | 86 " Handle the large selection over 262040 byte. |
88 let length = 262044 | 87 let length = 262044 |
89 let sample = 'a' . repeat('b', length - 2) . 'c' | 88 let sample = 'a' . repeat('b', length - 2) . 'c' |
90 let @* = sample | 89 let @* = sample |