Mercurial > vim
diff src/testdir/test_terminal.vim @ 12343:72046661f6d0 v8.0.1051
patch 8.0.1051: cannot run terminal with spaces in argument
commit https://github.com/vim/vim/commit/9d654a8d8cd3421307445f111785fb303a38c2a0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 3 19:52:17 2017 +0200
patch 8.0.1051: cannot run terminal with spaces in argument
Problem: Cannot run terminal with spaces in argument.
Solution: Accept backslash to escape space and other characters. (closes
#1999)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 03 Sep 2017 20:00:04 +0200 |
parents | 040ec95b8647 |
children | 76ab57a79183 |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -293,6 +293,8 @@ func Test_terminal_size() let size = term_getsize('') bwipe! call assert_equal([7, 27], size) + + call delete('Xtext') endfunc func Test_terminal_curwin() @@ -325,7 +327,7 @@ func Test_terminal_curwin() split dummy bwipe! - + call delete('Xtext') endfunc func Test_finish_open_close() @@ -555,3 +557,19 @@ func Test_terminal_no_cmd() call assert_equal('look here', term_getline(buf, 1)) bwipe! endfunc + +func Test_terminal_special_chars() + " this file name only works on Unix + if !has('unix') + return + endif + call mkdir('Xdir with spaces') + call writefile(['x'], 'Xdir with spaces/quoted"file') + term ls Xdir\ with\ spaces/quoted\"file + call WaitFor('term_getline("", 1) =~ "quoted"') + call assert_match('quoted"file', term_getline('', 1)) + call term_wait('') + + call delete('Xdir with spaces', 'rf') + bwipe +endfunc