summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-08 14:14:43 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-08 14:14:43 +0100
commit31f19ce0a052f7c76d44a9a190e468c79cf5d56d (patch)
tree2893f4af9229e7010bbfd84796559500fd95bebf
parent9d9c35651712b88c81f1ae11091de1fd0bbbd35c (diff)
downloadvim-git-31f19ce0a052f7c76d44a9a190e468c79cf5d56d.tar.gz
patch 8.0.0154: system() test fails on OS/Xv8.0.0154
Problem: system() test fails on OS/X. Solution: Deal with leading spaces.
-rw-r--r--src/testdir/test_system.vim10
-rw-r--r--src/version.c2
2 files changed, 11 insertions, 1 deletions
diff --git a/src/testdir/test_system.vim b/src/testdir/test_system.vim
index be00d180c..0446bd910 100644
--- a/src/testdir/test_system.vim
+++ b/src/testdir/test_system.vim
@@ -19,13 +19,21 @@ function! Test_System()
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 = system('wc -l', bufnr('%'))
+ " On OS/X we get leading spaces
+ let out = substitute(out, '^ *', '', '')
+ call assert_equal("3\n", out)
let out = systemlist('wc -l', bufnr('%'))
" On Windows we may get a trailing CR.
if out != ["3\r"]
+ " On OS/X we get leading spaces
+ if type(out) == v:t_list
+ let out[0] = substitute(out[0], '^ *', '', '')
+ endif
call assert_equal(['3'], out)
endif
diff --git a/src/version.c b/src/version.c
index a1a74696a..368e6bea3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 154,
+/**/
153,
/**/
152,