Mercurial > vim
comparison src/testdir/test_gui.vim @ 26028:be2d004247e1 v8.2.3548
patch 8.2.3548: GTK GUI crashen when reading from stdin
Commit: https://github.com/vim/vim/commit/d68a0044858d00de6100def1e389a3a9c1cdbcdc
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 20 23:08:11 2021 +0100
patch 8.2.3548: GTK GUI crashen when reading from stdin
Problem: GTK GUI crashen when reading from stdin.
Solution: Do not overwrite the NUL after the string. (closes https://github.com/vim/vim/issues/9028)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 21 Oct 2021 00:15:03 +0200 |
parents | 34b75c77a7bd |
children | c2c40cefc17b |
comparison
equal
deleted
inserted
replaced
26027:988f7d88aacb | 26028:be2d004247e1 |
---|---|
141 let @+ = test_call | 141 let @+ = test_call |
142 call system(run_vimtest) | 142 call system(run_vimtest) |
143 call assert_equal(test_response, @+) | 143 call assert_equal(test_response, @+) |
144 | 144 |
145 let @+ = quoteplus_saved | 145 let @+ = quoteplus_saved |
146 endfunc | |
147 | |
148 func Test_gui_read_stdin() | |
149 CheckUnix | |
150 | |
151 call writefile(['some', 'lines'], 'Xstdin') | |
152 let script =<< trim END | |
153 call writefile(getline(1, '$'), 'XstdinOK') | |
154 qa! | |
155 END | |
156 call writefile(script, 'Xscript') | |
157 | |
158 " Cannot use --not-a-term here, the "reading from stdin" message would not be | |
159 " displayed. | |
160 let vimcmd = substitute(GetVimCommand(), '--not-a-term', '', '') | |
161 | |
162 call system('cat Xstdin | ' .. vimcmd .. ' -f -g -S Xscript -') | |
163 call assert_equal(['some', 'lines'], readfile('XstdinOK')) | |
164 | |
165 call delete('Xstdin') | |
166 call delete('XstdinOK') | |
167 call delete('Xscript') | |
146 endfunc | 168 endfunc |
147 | 169 |
148 func Test_set_background() | 170 func Test_set_background() |
149 let background_saved = &background | 171 let background_saved = &background |
150 | 172 |