aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/system_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
commit1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch)
treecd08258054db80bb9a11b1061bb091c70b76926a /test/functional/vimscript/system_spec.lua
parenteaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.tar.gz
rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.tar.bz2
rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to 'test/functional/vimscript/system_spec.lua')
-rw-r--r--test/functional/vimscript/system_spec.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/functional/vimscript/system_spec.lua b/test/functional/vimscript/system_spec.lua
index 7ada1c4bea..90aab48d61 100644
--- a/test/functional/vimscript/system_spec.lua
+++ b/test/functional/vimscript/system_spec.lua
@@ -210,8 +210,8 @@ describe('system()', function()
end)
it('prints verbose information', function()
- nvim('set_option', 'shell', 'fake_shell')
- nvim('set_option', 'shellcmdflag', 'cmdflag')
+ nvim('set_option_value', 'shell', 'fake_shell', {})
+ nvim('set_option_value', 'shellcmdflag', 'cmdflag', {})
screen:try_resize(72, 14)
feed(':4verbose echo system("echo hi")<cr>')
@@ -335,12 +335,12 @@ describe('system()', function()
if is_os('win') then
eq("echoed\n", eval('system("echo echoed")'))
else
- eq("echoed", eval('system("echo -n echoed")'))
+ eq("echoed", eval('system("printf echoed")'))
end
end)
it('to backgrounded command does not crash', function()
-- This is indeterminate, just exercise the codepath. May get E5677.
- feed_command('call system(has("win32") ? "start /b /wait cmd /c echo echoed" : "echo -n echoed &")')
+ feed_command('call system(has("win32") ? "start /b /wait cmd /c echo echoed" : "printf echoed &")')
local v_errnum = string.match(eval("v:errmsg"), "^E%d*:")
if v_errnum then
eq("E5677:", v_errnum)
@@ -393,7 +393,7 @@ describe('system()', function()
end)
describe('with output containing NULs', function()
- local fname = 'Xtest'
+ local fname = 'Xtest_functional_vimscript_system_nuls'
before_each(create_file_with_nuls(fname))
after_each(delete_file(fname))
@@ -549,7 +549,7 @@ describe('systemlist()', function()
end)
describe('with output containing NULs', function()
- local fname = 'Xtest'
+ local fname = 'Xtest_functional_vimscript_systemlist_nuls'
before_each(function()
command('set ff=unix')
@@ -644,12 +644,12 @@ describe('shell :!', function()
if is_os('win') then
feed(':4verbose %!sort /R<cr>')
screen:expect{
- any=[[Executing command: .?& { Get%-Content .* | & sort /R } 2>&1 | Out%-File %-Encoding UTF8 .*; exit $LastExitCode"]]
+ any=[[Executing command: .?& { Get%-Content .* | & sort /R } 2>&1 | %%{ "$_" } | Out%-File .*; exit $LastExitCode"]]
}
else
feed(':4verbose %!sort -r<cr>')
screen:expect{
- any=[[Executing command: .?& { Get%-Content .* | & sort %-r } 2>&1 | Out%-File %-Encoding UTF8 .*; exit $LastExitCode"]]
+ any=[[Executing command: .?& { Get%-Content .* | & sort %-r } 2>&1 | %%{ "$_" } | Out%-File .*; exit $LastExitCode"]]
}
end
feed('<CR>')