diff options
author | James McCoy <jamessan@jamessan.com> | 2019-12-15 21:17:16 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2019-12-15 21:17:16 -0500 |
commit | 6566251d144d2c9c9e08e05c8c3a3fe9915a19b8 (patch) | |
tree | 980fd0c7287e295c8ac72858b0794f72224415e0 /test/functional/ui/output_spec.lua | |
parent | 9c4223215f71e1212462ada4e698be1b31437dd9 (diff) | |
parent | 9f3d483c79f03c48239fdc82cc02e8685a03d22a (diff) | |
download | rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.tar.gz rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.tar.bz2 rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.zip |
Merge remote-tracking branch 'upstream/master' into libcall
Diffstat (limited to 'test/functional/ui/output_spec.lua')
-rw-r--r-- | test/functional/ui/output_spec.lua | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/test/functional/ui/output_spec.lua b/test/functional/ui/output_spec.lua index c028f44b44..9b1e803649 100644 --- a/test/functional/ui/output_spec.lua +++ b/test/functional/ui/output_spec.lua @@ -10,6 +10,7 @@ local iswin = helpers.iswin local clear = helpers.clear local command = helpers.command local nvim_dir = helpers.nvim_dir +local set_shell_powershell = helpers.set_shell_powershell describe("shell command :!", function() local screen @@ -30,7 +31,6 @@ describe("shell command :!", function() after_each(function() child_session.feed_data("\3") -- Ctrl-C - screen:detach() end) it("displays output without LF/EOF. #4646 #4569 #3772", function() @@ -51,8 +51,7 @@ describe("shell command :!", function() it("throttles shell-command output greater than ~10KB", function() if 'openbsd' == helpers.uname() then - pending('FIXME #10804', function() end) - return + pending('FIXME #10804') end child_session.feed_data(":!"..nvim_dir.."/shell-test REP 30001 foo\n") @@ -96,8 +95,7 @@ describe("shell command :!", function() it('handles control codes', function() if iswin() then - pending('missing printf', function() end) - return + pending('missing printf') end local screen = Screen.new(50, 4) screen:attach() @@ -230,4 +228,23 @@ describe("shell command :!", function() ]]) end) end) + if iswin() or eval('executable("pwsh")') == 1 then + it('powershell supports literal strings', function() + set_shell_powershell() + local screen = Screen.new(30, 4) + screen:attach() + feed_command([[!'Write-Output $a']]) + screen:expect{any='\nWrite%-Output %$a', timeout=10000} + feed_command([[!$a = 1; Write-Output '$a']]) + screen:expect{any='\n%$a', timeout=10000} + feed_command([[!"Write-Output $a"]]) + screen:expect{any='\nWrite%-Output', timeout=10000} + feed_command([[!$a = 1; Write-Output "$a"]]) + screen:expect{any='\n1', timeout=10000} + feed_command(iswin() + and [[!& 'C:\\Windows\\system32\\cmd.exe' /c 'echo $a']] + or [[!& '/bin/sh' -c 'echo ''$a''']]) + screen:expect{any='\n%$a', timeout=10000} + end) + end end) |