comparison src/testdir/test_shell.vim @ 30626:5bc844667d46 v9.0.0648

patch 9.0.0648: when using powershell input redirection does not work Commit: https://github.com/vim/vim/commit/0a016671b96ae7d27926e9d36dc11945c8f5749d Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon Oct 3 16:05:28 2022 +0100 patch 9.0.0648: when using powershell input redirection does not work Problem: When using powershell input redirection does not work. Solution: Use a different shell command for powershell. (Yegappan Lakshmanan, closes #11257)
author Bram Moolenaar <Bram@vim.org>
date Mon, 03 Oct 2022 17:15:03 +0200
parents 008808e60963
children ae10b91ac6b3
comparison
equal deleted inserted replaced
30625:33ed996584e5 30626:5bc844667d46
92 r !echo hello 92 r !echo hello
93 call assert_equal('hello', substitute(getline(2), '\W', '', 'g'), e[0]) 93 call assert_equal('hello', substitute(getline(2), '\W', '', 'g'), e[0])
94 catch 94 catch
95 call assert_report('Failed to run shell command, shell: ' .. e[0] 95 call assert_report('Failed to run shell command, shell: ' .. e[0]
96 \ .. ', caught ' .. v:exception) 96 \ .. ', caught ' .. v:exception)
97 finally
98 bwipe!
99 endtry
100
101 " filter buffer contents through an external command
102 new
103 call setline(1, ['tom', 'sam', 'andy'])
104 try
105 %!sort
106 call assert_equal(['andy', 'sam', 'tom'], getline(1, '$'), e[0])
107 catch
108 call assert_report($'Failed to filter buffer contents, shell: {e[0]}, caught {v:exception}')
97 finally 109 finally
98 bwipe! 110 bwipe!
99 endtry 111 endtry
100 endif 112 endif
101 endfor 113 endfor