File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,14 +185,19 @@ func Test_terminal_scrape_multibyte()
185185 endif
186186 call writefile ([" léttまrs" ], ' Xtext' )
187187 if has (' win32' )
188- let cmd = ' cmd /c "type Xtext"'
188+ " Run cmd with UTF-8 codepage to make the type command print the expected
189+ " multibyte characters.
190+ let g: buf = term_start (" cmd /K chcp 65001" )
191+ call term_sendkeys (g: buf , " type Xtext\<CR> " )
192+ call term_sendkeys (g: buf , " exit\<CR> " )
193+ let g: line = 4
189194 else
190- let cmd = " cat Xtext"
195+ let g: buf = term_start (" cat Xtext" )
196+ let g: line = 1
191197 endif
192- let g: buf = term_start (cmd)
193198
194- call WaitFor (' term_scrape(g:buf, 1 )[0].chars == "l"' )
195- let l = term_scrape (g: buf , 1 )
199+ call WaitFor (' term_scrape(g:buf, g:line )[0].chars == "l"' )
200+ let l = term_scrape (g: buf , g: line )
196201 call assert_true (len (l ) >= 7 )
197202 call assert_equal (' l' , l [0 ].chars)
198203 call assert_equal (' é' , l [1 ].chars)
@@ -210,6 +215,7 @@ func Test_terminal_scrape_multibyte()
210215
211216 exe g: buf . ' bwipe'
212217 unlet g: buf
218+ unlet g: line
213219 call delete (' Xtext' )
214220endfunc
215221
Original file line number Diff line number Diff line change @@ -769,6 +769,8 @@ static char *(features[]) =
769769
770770static int included_patches [] =
771771{ /* Add new patch number below this line */
772+ /**/
773+ 943 ,
772774/**/
773775 942 ,
774776/**/
You can’t perform that action at this time.
0 commit comments