Mercurial > vim
diff src/testdir/test_channel.vim @ 12596:d177c142d086 v8.0.1176
patch 8.0.1176: job_start() does not handle quote and backslash correctly
commit https://github.com/vim/vim/commit/d78f03f86045184dfd191f00359baa61e2e79d1f
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Oct 6 01:07:41 2017 +0200
patch 8.0.1176: job_start() does not handle quote and backslash correctly
Problem: Job_start() does not handle quote and backslash correctly.
Solution: Remove quotes, recognize and remove backslashes.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 06 Oct 2017 01:15:05 +0200 |
parents | 0a61213afdd2 |
children | 810a4c3d4f7e |
line wrap: on
line diff
--- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -1590,6 +1590,22 @@ func Test_collapse_buffers() bwipe! endfunc +func Test_cmd_parsing() + if !has('unix') + return + endif + call assert_false(filereadable("file with space")) + let job = job_start('touch "file with space"') + call WaitFor('filereadable("file with space")') + call assert_true(filereadable("file with space")) + call delete("file with space") + + let job = job_start('touch file\ with\ space') + call WaitFor('filereadable("file with space")') + call assert_true(filereadable("file with space")) + call delete("file with space") +endfunc + func Test_raw_passes_nul() if !executable('cat') || !has('job') return