Mercurial > vim
comparison src/testdir/test_system.vim @ 20313:244eb8d8d100 v8.2.0712
patch 8.2.0712: various code not fully tested
Commit: https://github.com/vim/vim/commit/0ff5dedf0f69e56320199db7a2aad46be2a1f9b7
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 7 18:43:44 2020 +0200
patch 8.2.0712: various code not fully tested
Problem: Various code not fully tested.
Solution: Add a few more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6049)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 07 May 2020 18:45:04 +0200 |
parents | 0eeaa9a6e4e7 |
children | 756562af426e |
comparison
equal
deleted
inserted
replaced
20312:0742d56da9b2 | 20313:244eb8d8d100 |
---|---|
141 let &shell = shell_save | 141 let &shell = shell_save |
142 let &shellxquote = shellxquote_save | 142 let &shellxquote = shellxquote_save |
143 call delete('Xdir with spaces', 'rf') | 143 call delete('Xdir with spaces', 'rf') |
144 endtry | 144 endtry |
145 endfunc | 145 endfunc |
146 | |
147 " Test for 'shellxquote' | |
148 func Test_Shellxquote() | |
149 CheckUnix | |
150 | |
151 let save_shell = &shell | |
152 let save_sxq = &shellxquote | |
153 let save_sxe = &shellxescape | |
154 | |
155 call writefile(['#!/bin/sh', 'echo "Cmd: [$*]" > Xlog'], 'Xtestshell') | |
156 call setfperm('Xtestshell', "r-x------") | |
157 set shell=./Xtestshell | |
158 | |
159 set shellxquote=\\" | |
160 call feedkeys(":!pwd\<CR>\<CR>", 'xt') | |
161 call assert_equal(['Cmd: [-c "pwd"]'], readfile('Xlog')) | |
162 | |
163 set shellxquote=( | |
164 call feedkeys(":!pwd\<CR>\<CR>", 'xt') | |
165 call assert_equal(['Cmd: [-c (pwd)]'], readfile('Xlog')) | |
166 | |
167 set shellxquote=\\"( | |
168 call feedkeys(":!pwd\<CR>\<CR>", 'xt') | |
169 call assert_equal(['Cmd: [-c "(pwd)"]'], readfile('Xlog')) | |
170 | |
171 set shellxescape=\"&<<()@^ | |
172 set shellxquote=( | |
173 call feedkeys(":!pwd\"&<<{}@^\<CR>\<CR>", 'xt') | |
174 call assert_equal(['Cmd: [-c (pwd^"^&^<^<{}^@^^)]'], readfile('Xlog')) | |
175 | |
176 let &shell = save_shell | |
177 let &shellxquote = save_sxq | |
178 let &shellxescape = save_sxe | |
179 call delete('Xtestshell') | |
180 call delete('Xlog') | |
181 endfunc | |
182 | |
183 " vim: shiftwidth=2 sts=2 expandtab |