From fa0e32fba2b5af04a4e1c5afeb4af66c2386dd1e Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Mar 2018 13:53:15 -0400 Subject: oldtests: win: cmd.exe echo has trailing CR --- src/nvim/testdir/test_system.vim | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/nvim/testdir/test_system.vim b/src/nvim/testdir/test_system.vim index ce9d110d82..d3c0594c03 100644 --- a/src/nvim/testdir/test_system.vim +++ b/src/nvim/testdir/test_system.vim @@ -5,14 +5,12 @@ function! Test_System() 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 + call assert_equal("123\n", out) let out = systemlist('echo 123') - " On Windows we may get a trailing space and CR. - if out != ["123 \r"] + if &shell =~# 'cmd.exe$' + call assert_equal(["123\r"], out) + else call assert_equal(['123'], out) endif -- cgit