Mercurial > vim
comparison src/testdir/test_terminal.vim @ 18473:0eeaa9a6e4e7 v8.1.2230
patch 8.1.2230: MS-Windows: testing external commands can be improved
Commit: https://github.com/vim/vim/commit/077ff436a77f95c69da219af8cd8f553ff4f9ff8
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Oct 28 00:42:21 2019 +0100
patch 8.1.2230: MS-Windows: testing external commands can be improved
Problem: MS-Windows: testing external commands can be improved.
Solution: Adjust tests, remove duplicate test. (closes https://github.com/vim/vim/issues/4928)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 28 Oct 2019 00:45:03 +0100 |
parents | 507348b211b4 |
children | 39b0c28fe495 |
comparison
equal
deleted
inserted
replaced
18472:fa7598096478 | 18473:0eeaa9a6e4e7 |
---|---|
561 call assert_equal(4, winheight(0)) | 561 call assert_equal(4, winheight(0)) |
562 bwipe | 562 bwipe |
563 endfunc | 563 endfunc |
564 | 564 |
565 func Test_terminal_cwd() | 565 func Test_terminal_cwd() |
566 if !executable('pwd') | 566 if has('win32') |
567 return | 567 let cmd = 'cmd /c cd' |
568 else | |
569 CheckExecutable pwd | |
570 let cmd = 'pwd' | |
568 endif | 571 endif |
569 call mkdir('Xdir') | 572 call mkdir('Xdir') |
570 let buf = term_start('pwd', {'cwd': 'Xdir'}) | 573 let buf = term_start(cmd, {'cwd': 'Xdir'}) |
571 call WaitForAssert({-> assert_equal('Xdir', fnamemodify(getline(1), ":t"))}) | 574 call WaitForAssert({-> assert_equal('Xdir', fnamemodify(getline(1), ":t"))}) |
572 | 575 |
573 exe buf . 'bwipe' | 576 exe buf . 'bwipe' |
574 call delete('Xdir', 'rf') | 577 call delete('Xdir', 'rf') |
575 endfunc | 578 endfunc |
2029 | 2032 |
2030 call delete('Xfile') | 2033 call delete('Xfile') |
2031 endfunc | 2034 endfunc |
2032 | 2035 |
2033 func Test_terminal_no_job() | 2036 func Test_terminal_no_job() |
2034 let term = term_start('false', {'term_finish': 'close'}) | 2037 if has('win32') |
2038 let cmd = 'cmd /c ""' | |
2039 else | |
2040 CheckExecutable false | |
2041 let cmd = 'false' | |
2042 endif | |
2043 let term = term_start(cmd, {'term_finish': 'close'}) | |
2035 call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) }) | 2044 call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) }) |
2036 endfunc | 2045 endfunc |
2037 | 2046 |
2038 func Test_term_getcursor() | 2047 func Test_term_getcursor() |
2039 CheckUnix | 2048 CheckUnix |