comparison src/testdir/test_terminal.vim @ 12343:72046661f6d0 v8.0.1051

patch 8.0.1051: cannot run terminal with spaces in argument commit https://github.com/vim/vim/commit/9d654a8d8cd3421307445f111785fb303a38c2a0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 3 19:52:17 2017 +0200 patch 8.0.1051: cannot run terminal with spaces in argument Problem: Cannot run terminal with spaces in argument. Solution: Accept backslash to escape space and other characters. (closes #1999)
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Sep 2017 20:00:04 +0200
parents 040ec95b8647
children 76ab57a79183
comparison
equal deleted inserted replaced
12342:0e49fefc0769 12343:72046661f6d0
291 291
292 call term_start(cmd, {'vertical': 1, 'term_rows': 7, 'term_cols': 27}) 292 call term_start(cmd, {'vertical': 1, 'term_rows': 7, 'term_cols': 27})
293 let size = term_getsize('') 293 let size = term_getsize('')
294 bwipe! 294 bwipe!
295 call assert_equal([7, 27], size) 295 call assert_equal([7, 27], size)
296
297 call delete('Xtext')
296 endfunc 298 endfunc
297 299
298 func Test_terminal_curwin() 300 func Test_terminal_curwin()
299 let cmd = Get_cat_123_cmd() 301 let cmd = Get_cat_123_cmd()
300 call assert_equal(1, winnr('$')) 302 call assert_equal(1, winnr('$'))
323 call assert_equal(2, winnr('$')) 325 call assert_equal(2, winnr('$'))
324 bwipe! 326 bwipe!
325 327
326 split dummy 328 split dummy
327 bwipe! 329 bwipe!
328 330 call delete('Xtext')
329 endfunc 331 endfunc
330 332
331 func Test_finish_open_close() 333 func Test_finish_open_close()
332 call assert_equal(1, winnr('$')) 334 call assert_equal(1, winnr('$'))
333 335
553 call system('echo "look here" > ' . pty) 555 call system('echo "look here" > ' . pty)
554 call term_wait(buf) 556 call term_wait(buf)
555 call assert_equal('look here', term_getline(buf, 1)) 557 call assert_equal('look here', term_getline(buf, 1))
556 bwipe! 558 bwipe!
557 endfunc 559 endfunc
560
561 func Test_terminal_special_chars()
562 " this file name only works on Unix
563 if !has('unix')
564 return
565 endif
566 call mkdir('Xdir with spaces')
567 call writefile(['x'], 'Xdir with spaces/quoted"file')
568 term ls Xdir\ with\ spaces/quoted\"file
569 call WaitFor('term_getline("", 1) =~ "quoted"')
570 call assert_match('quoted"file', term_getline('', 1))
571 call term_wait('')
572
573 call delete('Xdir with spaces', 'rf')
574 bwipe
575 endfunc