Patch 8.0.0153 (after 8.0.0151)
Problem: system() test fails on MS-Windows.
Solution: Deal when extra space and CR.
Files: src/testdir/test_system.vim
*** ../vim-8.0.0152/src/testdir/test_system.vim 2017-01-08 13:25:47.626339783
+0100
--- src/testdir/test_system.vim 2017-01-08 13:51:25.560513157 +0100
***************
*** 4,19 ****
if !executable('echo') || !executable('cat') || !executable('wc')
return
endif
! call assert_equal("123\n", system('echo 123'))
! call assert_equal(['123'], systemlist('echo 123'))
call assert_equal('123', system('cat', '123'))
call assert_equal(['123'], systemlist('cat', '123'))
call assert_equal(["as\<NL>df"], systemlist('cat', ["as\<NL>df"]))
new Xdummy
call setline(1, ['asdf', "pw\<NL>er", 'xxxx'])
call assert_equal("3\n", system('wc -l', bufnr('%')))
! call assert_equal(['3'], systemlist('wc -l', bufnr('%')))
! call assert_equal(['asdf', "pw\<NL>er", 'xxxx'], systemlist('cat',
bufnr('%')))
bwipe!
call assert_fails('call system("wc -l", 99999)', 'E86:')
--- 4,39 ----
if !executable('echo') || !executable('cat') || !executable('wc')
return
endif
! let out = system('echo 123')
! " On Windows we may get a trailing space.
! if out != "123 \n"
! call assert_equal("123\n", out)
! endif
!
! let out = systemlist('echo 123')
! " On Windows we may get a trailing space and CR.
! if out != ["123 \r"]
! call assert_equal(['123'], out)
! endif
!
call assert_equal('123', system('cat', '123'))
call assert_equal(['123'], systemlist('cat', '123'))
call assert_equal(["as\<NL>df"], systemlist('cat', ["as\<NL>df"]))
new Xdummy
call setline(1, ['asdf', "pw\<NL>er", 'xxxx'])
call assert_equal("3\n", system('wc -l', bufnr('%')))
!
! let out = systemlist('wc -l', bufnr('%'))
! " On Windows we may get a trailing CR.
! if out != ["3\r"]
! call assert_equal(['3'], out)
! endif
!
! let out = systemlist('cat', bufnr('%'))
! " On Windows we may get a trailing CR.
! if out != ["asdf\r", "pw\<NL>er\r", "xxxx\r"]
! call assert_equal(['asdf', "pw\<NL>er", 'xxxx'], out)
! endif
bwipe!
call assert_fails('call system("wc -l", 99999)', 'E86:')
*** ../vim-8.0.0152/src/version.c 2017-01-08 13:38:53.028502710 +0100
--- src/version.c 2017-01-08 13:52:33.194418853 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 153,
/**/
--
hundred-and-one symptoms of being an internet addict:
218. Your spouse hands you a gift wrapped magnet with your PC's name
on it and you accuse him or her of genocide.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.