Mercurial > vim
comparison src/testdir/test_channel.vim @ 19611:db60620b7afb v8.2.0362
patch 8.2.0362: MS-Windows: channel test fails if grep is not available
Commit: https://github.com/vim/vim/commit/d0d440f702d1c6fef36386f8b91d074d0f3e4718
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 7 17:24:59 2020 +0100
patch 8.2.0362: MS-Windows: channel test fails if grep is not available
Problem: MS-Windows: channel test fails if grep is not available.
Solution: Use another command. (Ken Takata, closes https://github.com/vim/vim/issues/5739)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 07 Mar 2020 17:30:03 +0100 |
parents | a5ac657fcd70 |
children | 283c8bc6a8e2 |
comparison
equal
deleted
inserted
replaced
19610:6eb401ee4b0c | 19611:db60620b7afb |
---|---|
1990 " this was leaking memory | 1990 " this was leaking memory |
1991 call assert_fails("call job_start([''])", "E474:") | 1991 call assert_fails("call job_start([''])", "E474:") |
1992 endfunc | 1992 endfunc |
1993 | 1993 |
1994 func Test_issue_5150() | 1994 func Test_issue_5150() |
1995 let g:job = job_start('grep foo', {}) | 1995 if has('win32') |
1996 let cmd = 'cmd /c pause' | |
1997 else | |
1998 let cmd = 'grep foo' | |
1999 endif | |
2000 let g:job = job_start(cmd, {}) | |
1996 call job_stop(g:job) | 2001 call job_stop(g:job) |
1997 sleep 10m | 2002 sleep 10m |
1998 call assert_equal(-1, job_info(g:job).exitval) | 2003 call assert_equal(-1, job_info(g:job).exitval) |
1999 let g:job = job_start('grep foo', {}) | 2004 let g:job = job_start(cmd, {}) |
2000 call job_stop(g:job, 'term') | 2005 call job_stop(g:job, 'term') |
2001 sleep 10m | 2006 sleep 10m |
2002 call assert_equal(-1, job_info(g:job).exitval) | 2007 call assert_equal(-1, job_info(g:job).exitval) |
2003 let g:job = job_start('grep foo', {}) | 2008 let g:job = job_start(cmd, {}) |
2004 call job_stop(g:job, 'kill') | 2009 call job_stop(g:job, 'kill') |
2005 sleep 10m | 2010 sleep 10m |
2006 call assert_equal(-1, job_info(g:job).exitval) | 2011 call assert_equal(-1, job_info(g:job).exitval) |
2007 endfunc | 2012 endfunc |
2008 | 2013 |