Mercurial > vim
comparison src/testdir/test_terminal.vim @ 18532:6fe1d322710d v8.1.2260
patch 8.1.2260: terminal test may fail on MS-Windows
Commit: https://github.com/vim/vim/commit/36ec6f6953043270630159a61438ce558552fe3a
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 5 22:38:47 2019 +0100
patch 8.1.2260: terminal test may fail on MS-Windows
Problem: Terminal test may fail on MS-Windows.
Solution: Catch the situation that "term dir" fails with a CreateProcess
error.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 05 Nov 2019 22:45:04 +0100 |
parents | ef397aa47dd4 |
children | 97d534e17874 |
comparison
equal
deleted
inserted
replaced
18531:352597fa076b | 18532:6fe1d322710d |
---|---|
2224 term ++shell exec ls runtest.vim | 2224 term ++shell exec ls runtest.vim |
2225 call WaitForAssert({-> assert_match('runtest.vim', term_getline(bufnr(), 1))}) | 2225 call WaitForAssert({-> assert_match('runtest.vim', term_getline(bufnr(), 1))}) |
2226 bwipe! | 2226 bwipe! |
2227 elseif has('win32') | 2227 elseif has('win32') |
2228 " dir is a shell builtin command, should fail without a shell. | 2228 " dir is a shell builtin command, should fail without a shell. |
2229 term dir /b runtest.vim | 2229 try |
2230 call WaitForAssert({-> assert_match('job failed\|cannot access .*: No such file or directory', term_getline(bufnr(), 1))}) | 2230 term dir /b runtest.vim |
2231 call WaitForAssert({-> assert_match('job failed\|cannot access .*: No such file or directory', term_getline(bufnr(), 1))}) | |
2232 catch /CreateProcess/ | |
2233 " ignore | |
2234 endtry | |
2231 bwipe! | 2235 bwipe! |
2232 | 2236 |
2233 term ++shell dir /b runtest.vim | 2237 term ++shell dir /b runtest.vim |
2234 call WaitForAssert({-> assert_match('runtest.vim', term_getline(bufnr(), 1))}) | 2238 call WaitForAssert({-> assert_match('runtest.vim', term_getline(bufnr(), 1))}) |
2235 bwipe! | 2239 bwipe! |