comparison src/testdir/test_terminal.vim @ 12240:24abce52ad20 v8.0.1000

patch 8.0.1000: cannot open a terminal without running a job in it commit https://github.com/vim/vim/commit/13ebb03e7520c2c34f93444b0146640ca08e7424 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 26 22:02:51 2017 +0200 patch 8.0.1000: cannot open a terminal without running a job in it Problem: Cannot open a terminal without running a job in it. Solution: Make ":terminal NONE" open a terminal with a pty.
author Christian Brabandt <cb@256bit.org>
date Sat, 26 Aug 2017 22:15:04 +0200
parents 42823852a212
children eddd5ea01116
comparison
equal deleted inserted replaced
12239:658d96102102 12240:24abce52ad20
503 call assert_equal(['2', '2', '10'], nrs) 503 call assert_equal(['2', '2', '10'], nrs)
504 bwipe 504 bwipe
505 505
506 bwipe! 506 bwipe!
507 endfunc 507 endfunc
508
509 func Test_terminal_no_cmd()
510 " Todo: make this work on all systems.
511 if !has('unix')
512 return
513 endif
514 " Todo: make this work in the GUI
515 if !has('gui_running')
516 return
517 endif
518 let buf = term_start('NONE', {})
519 call assert_notequal(0, buf)
520
521 let pty = job_info(term_getjob(buf))['tty']
522 call assert_notequal('', pty)
523 call system('echo "look here" > ' . pty)
524 call term_wait(buf)
525 call assert_equal('look here', term_getline(buf, 1))
526 bwipe!
527 endfunc